[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting ...
Tom Elrod
tom.elrod at jboss.com
Wed Jul 19 12:39:17 EDT 2006
User: telrod
Date: 06/07/19 12:39:17
Modified: src/main/org/jboss/remoting AbstractInvoker.java
ServerInvoker.java
Log:
JBREM-507 - updating/adding javadoc for configuration properties.
Revision Changes Path
1.12 +2 -6 JBossRemoting/src/main/org/jboss/remoting/AbstractInvoker.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: AbstractInvoker.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/AbstractInvoker.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- AbstractInvoker.java 22 Jun 2006 21:02:02 -0000 1.11
+++ AbstractInvoker.java 19 Jul 2006 16:39:17 -0000 1.12
@@ -25,12 +25,10 @@
import org.jboss.logging.Logger;
import org.jboss.remoting.loading.ClassByteClassLoader;
import org.jboss.remoting.marshal.MarshallLoaderFactory;
-import org.jboss.remoting.security.CustomSSLSocketFactory;
import org.jboss.remoting.security.SSLSocketBuilder;
import org.jboss.remoting.serialization.SerializationStreamFactory;
import javax.net.SocketFactory;
-import javax.net.ssl.SSLSocketFactory;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.util.HashMap;
@@ -42,12 +40,10 @@
*
* @author <a href="mailto:jhaynie at vocalocity.net">Jeff Haynie</a>
* @author <a href="mailto:telrod at e2technologies.net">Tom Elrod</a>
- * @version $Revision: 1.11 $
+ * @version $Revision: 1.12 $
*/
public abstract class AbstractInvoker implements Invoker
{
- public static final String SOCKET_FACTORY = "socketFactory";
-
protected final Logger log = Logger.getLogger(getClass());
protected ClassByteClassLoader classbyteloader;
protected InvokerLocator locator;
1.43 +99 -2 JBossRemoting/src/main/org/jboss/remoting/ServerInvoker.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ServerInvoker.java
===================================================================
RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/ServerInvoker.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- ServerInvoker.java 12 Jul 2006 04:49:51 -0000 1.42
+++ ServerInvoker.java 19 Jul 2006 16:39:17 -0000 1.43
@@ -58,18 +58,79 @@
*
* @author <a href="mailto:jhaynie at vocalocity.net">Jeff Haynie</a>
* @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
- * @version $Revision: 1.42 $
+ * @version $Revision: 1.43 $
*/
public abstract class ServerInvoker extends AbstractInvoker implements ServerInvokerMBean
{
+ /**
+ * Key for the the maximum number of thread to be used in the thread pool
+ * for one way invocations (server side).
+ * This property is only used when the default oneway thread pool is used.
+ */
public static final String MAX_NUM_ONEWAY_THREADS_KEY = "maxNumThreadsOneway";
+
+ /**
+ * Key for setting the setting the oneway thread pool to use.
+ * The value used with this key will first be checked to see if is a JMX ObjectName and if so,
+ * try to look up associated mbean for the ObjectName given and cast to type
+ * org.jboss.util.threadpool.ThreadPoolMBean (via MBeanServerInvocationHandler.newProxyInstance()).
+ * If the value is not a JMX ObjectName, will assume is a fully qualified classname and load the
+ * coresponding class and create a new instance of it (which will require it to have a void constructor).
+ * The newly created instance will then be cast to type of org.jboss.util.threadpool.ThreadPool.
+ */
public static final String ONEWAY_THREAD_POOL_CLASS_KEY = "onewayThreadPool";
+
+ /**
+ * Key for setting the address the server invoker should bind to. The value can be either host name or IP.
+ */
public static final String SERVER_BIND_ADDRESS_KEY = "serverBindAddress";
+
+ /**
+ * Key for setting the addres the client invoker should connecto to.
+ * This should be used when client will be connecting to server from outside the server's network
+ * and the external address is different from that of the internal address the server invoker
+ * will bind to (e.g. using NAT to expose different external address). This will mostly be
+ * useful when client uses remoting detection to discover remoting servers.
+ * The value can be either host name or IP.
+ */
public static final String CLIENT_CONNECT_ADDRESS_KEY = "clientConnectAddress";
+
+ /**
+ * Key for setting the port the server invoker should bind to.
+ * If the value supplied is less than or equal to zero, the server invoker will randomly choose a free port to use.
+ */
public static final String SERVER_BIND_PORT_KEY = "serverBindPort";
+
+ /**
+ * key for setting the port the client invoker should connect to.
+ * This should be used when client will be connecting to server from outside the server's
+ * network and the external port is different from that of the internal port the server
+ * invoker will bind to (e.g. using NAT to expose different port routing).
+ * This will be mostly useful when client uses remoting detection to discover remoting servers.
+ */
public static final String CLIENT_CONNECT_PORT_KEY = "clientConnectPort";
+
+ /**
+ * Key used for setting the amount of time (in milliseconds) that a client should renew its lease.
+ * If this value is not set, the default of five seconds (see DEFAULT_CLIENT_LEASE_PERIOD), will be used.
+ * This value will also be what is given to the client when it initially querys server for leasing information.
+ */
public static final String CLIENT_LEASE_PERIOD = "clientLeasePeriod";
+
+ /**
+ * Key for setting the timeout value (in milliseconds) for socket connections.
+ */
public static final String TIMEOUT = "timeout";
+
+ /**
+ * Key for setting the value for the server socket factory to be used by the server invoker.
+ * The value can be either a JMX Object name, in which case will lookup the mbean and create
+ * a proxy to it with type of org.jboss.remoting.security.ServerSocketFactoryMBean
+ * (via MBeanServerInvocationHandler.newProxyInstance()). If not a JMX ObjectName, will assume
+ * is the fully qualified classname to the implementation to be used and will load the class,
+ * create a new instance of it (which requires it to have a void constructor).
+ * The instance will then be cast to type javax.net.ServerSocketFactory.
+ */
public static final String SERVER_SOCKET_FACTORY = "serverSocketFactory";
/**
@@ -451,11 +512,19 @@
return ServerSocketFactory.getDefault();
}
+ /**
+ * Sets timeout (in millseconds) to be used for the socket connection.
+ * @param timeout
+ */
public void setTimeout(int timeout)
{
this.timeout = timeout;
}
+ /**
+ * The timeout (in milliseconds) used for the socket connection.
+ * @return
+ */
public int getTimeout()
{
return timeout;
@@ -505,11 +574,22 @@
}
}
+ /**
+ * Sets the amount of time (in milliseconds) that a client should renew its lease.
+ * If this value is not set, the default of five seconds (see DEFAULT_CLIENT_LEASE_PERIOD), will be used.
+ * This value will also be what is given to the client when it initially querys server for leasing information.
+ * If set after create() method called, this value will override value set by CLIENT_LEASE_PERIOD key.
+ * @param leasePeriodValue
+ */
public void setLeasePeriod(long leasePeriodValue)
{
this.leasePeriod = leasePeriodValue;
}
+ /**
+ * Gets the amount of time (in milliseconds) that a client should renew its lease.
+ * @return
+ */
public long getLeasePeriod()
{
return leasePeriod;
@@ -558,17 +638,30 @@
return serverBindPort;
}
-
+ /**
+ * Sets the maximum number of thread to be used in the thread pool for one way invocations (server side).
+ * This property is only used when the default oneway thread pool is used.
+ * If set after create() method called, this value will override value set by MAX_NUM_ONEWAY_THREADS_KEY key.
+ * @param numOfThreads
+ */
public void setMaxNumberOfOnewayThreads(int numOfThreads)
{
this.maxNumberThreads = numOfThreads;
}
+ /**
+ * Gets the maximum number of thread to be used in the thread pool for one way invocations (server side).
+ * @return
+ */
public int getMaxNumberOfOnewayThreads()
{
return this.maxNumberThreads;
}
+ /**
+ * Gets the oneway thread pool to use.
+ * @return
+ */
public ThreadPool getOnewayThreadPool()
{
if(onewayThreadPool == null)
@@ -614,6 +707,10 @@
return onewayThreadPool;
}
+ /**
+ * Sets the oneway thread pool to use.
+ * @param pool
+ */
public void setOnewayThreadPool(ThreadPool pool)
{
this.onewayThreadPool = pool;
More information about the jboss-cvs-commits
mailing list