| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.remoting.AbstractInvoker
org.jboss.remoting.ServerInvoker
org.jboss.remoting.transport.socket.SocketServerInvoker
org.jboss.remoting.transport.multiplex.MultiplexServerInvoker
public class MultiplexServerInvoker
MultiplexServerInvoker is the server side of the Multiplex transport.
 For more information, see Remoting documentation on labs.jboss.org.
| Nested Class Summary | |
|---|---|
protected static class | 
MultiplexServerInvoker.InternalHandshakeListener
 | 
static class | 
MultiplexServerInvoker.SocketGroupInfo
SocketGroupInfo holds all of the information for a single virtual socket group. | 
| Nested classes/interfaces inherited from class org.jboss.remoting.transport.socket.SocketServerInvoker | 
|---|
SocketServerInvoker.IdleTimerTask, SocketServerInvoker.ServerSocketRefresh | 
| Nested classes/interfaces inherited from class org.jboss.remoting.ServerInvoker | 
|---|
ServerInvoker.InvalidStateException | 
| Nested classes/interfaces inherited from class org.jboss.remoting.AbstractInvoker | 
|---|
AbstractInvoker.CallbackLocatorHolder | 
| Field Summary | |
|---|---|
protected static org.jboss.logging.Logger | 
log
 | 
| Fields inherited from class org.jboss.remoting.transport.socket.SocketServerInvoker | 
|---|
acceptThreads, backlog, CHECK_CONNECTION_KEY, clientpool, idleTimeout, idleTimerTask, MAX_POOL_SIZE_DEFAULT, maxPoolSize, newServerSocketFactory, numAcceptThreads, reuseAddress, running, SERVER_SOCKET_CLASS_FLAG, serverSocket, serverSocketClass, serverSocketFactoryLock, threadpool | 
| Fields inherited from class org.jboss.remoting.AbstractInvoker | 
|---|
classbyteloader, configuration, localServerLocators, locator, passConfigMapToMarshalFactory, serializationType, socketFactory, socketFactoryCreatedFromSSLParameters | 
| Constructor Summary | |
|---|---|
  | 
MultiplexServerInvoker(InvokerLocator locator)
Create a new MultiplexServerInvoker. | 
  | 
MultiplexServerInvoker(InvokerLocator locator,
                       java.util.Map configuration)
Create a new MultiplexServerInvoker. | 
protected  | 
MultiplexServerInvoker(InvokerLocator locator,
                       java.util.Map configuration,
                       java.net.ServerSocket serverSocket,
                       java.net.Socket socket,
                       java.util.Map virtualServerInvokers)
Create a new MultiplexServerInvoker. | 
| Method Summary | |
|---|---|
protected  void | 
cleanup()
 | 
protected  void | 
configureSocketGroupParameters(java.util.Map parameters)
 | 
protected static void | 
createPrimingSocket(MultiplexServerInvoker.SocketGroupInfo socketGroupInfo,
                    java.lang.String connectHost,
                    int connectPort,
                    java.net.InetAddress bindAddress,
                    int bindPort,
                    java.util.Map configuration,
                    int timeout)
 | 
protected static void | 
createPrimingSocket(MultiplexServerInvoker.SocketGroupInfo socketGroupInfo,
                    java.lang.String connectHost,
                    int connectPort,
                    java.util.Map configuration,
                    int timeout)
 | 
protected  java.net.ServerSocket | 
createServerSocket(int bindPort,
                   int backlog,
                   java.net.InetAddress bindAddress)
In creating the server socket, createServerSocket() determines whether multiplexing
 will be supported by this ServerInvoker. | 
protected  void | 
finishStart()
Finishes start up process when suitable bind and connect information is available.  | 
static java.util.Map | 
getAddressPairMap()
 | 
protected  java.lang.String | 
getDefaultDataType()
Each implementation of the remote client invoker should have a default data type that is uses in the case it is not specified in the invoker locator uri.  | 
 int | 
getInputBufferSize()
 | 
 int | 
getInputMaxErrors()
 | 
 int | 
getMaxAcceptErrors()
 | 
 java.lang.String | 
getMultiplexConnectHost()
 | 
 int | 
getMultiplexConnectPort()
 | 
 int | 
getOutputMaxChunkSize()
 | 
 int | 
getOutputMaxDataSlice()
 | 
 int | 
getOutputMaxTimeSlice()
 | 
 int | 
getOutputMessagePoolSize()
 | 
 int | 
getOutputMessageSize()
 | 
protected  void | 
getParameters()
 | 
 MultiplexServerInvoker | 
getServerInvoker(java.net.InetSocketAddress address)
Provides access to a virtual MultiplexServerInvoker in a master
 MultiplexServerInvoker's invoker farm. | 
 java.util.Collection | 
getServerInvokers()
Provides access to all virtual MultiplexServerInvokers in a master
 MultiplexServerInvoker's invoker farm. | 
 java.lang.String | 
getServerMultiplexId()
 | 
 java.net.ServerSocket | 
getServerSocket()
Returns ServerSocket used to accept invocation requests. | 
 int | 
getShutdownMonitorPeriod()
 | 
 int | 
getShutdownRefusalsMaximum()
 | 
 int | 
getShutdownRequestTimeout()
 | 
static java.util.Map | 
getSocketGroupMap()
 | 
 int | 
getStaticThreadsMonitorPeriod()
 | 
protected  java.lang.String | 
getThreadName(int i)
 | 
 boolean | 
isSafeToShutdown()
 | 
 void | 
notifyDisconnected(VirtualSocket virtualSocket)
 | 
protected  void | 
processInvocation(java.net.Socket socket)
The acceptor thread should spend as little time as possbile doing any kind of operation, and under no circumstances should perform IO on the new socket, which can potentially block and lock up the server.  | 
protected  void | 
refreshServerSocket()
refreshes the serverSocket by closing old one and creating a new ServerSocket from new ServerSocketFactory  | 
protected  void | 
resetLocator(int bindPort)
Called by MultiplexClientInvoker.createSocket() when it finds connection is broken and binds virtual socket group to new bind port.  | 
protected  void | 
rule1()
 | 
protected  void | 
rule2(java.lang.String connectHost,
      int connectPort)
 | 
protected  void | 
rule3()
 | 
protected  void | 
rule4()
 | 
 void | 
run()
 | 
protected  void | 
setBindingInfo()
 | 
 void | 
setInputBufferSize(int inputBufferSize)
 | 
 void | 
setInputMaxErrors(int inputMaxErrors)
 | 
 void | 
setMaxAcceptErrors(int maxAcceptErrors)
 | 
 void | 
setOutputMaxChunkSize(int outputMaxChunkSize)
 | 
 void | 
setOutputMaxDataSlice(int outputMaxDataSlice)
 | 
 void | 
setOutputMaxTimeSlice(int outputMaxTimeSlice)
 | 
 void | 
setOutputMessagePoolSize(int outputMessagePoolSize)
 | 
 void | 
setOutputMessageSize(int outputMessageSize)
 | 
 void | 
setShutdownMonitorPeriod(int shutdownMonitorPeriod)
 | 
 void | 
setShutdownRefusalsMaximum(int shutdownRefusalsMaximum)
 | 
 void | 
setShutdownRequestTimeout(int shutdownRequestTimeout)
 | 
 void | 
setStaticThreadsMonitorPeriod(int staticThreadsMonitorPeriod)
 | 
protected  void | 
setup()
 | 
 void | 
start()
Starts the invoker.  | 
 void | 
stop()
Stops the invoker.  | 
 java.lang.String | 
toString()
 | 
| Methods inherited from class org.jboss.remoting.transport.socket.SocketServerInvoker | 
|---|
destroy, finalize, getBacklog, getCurrentClientPoolSize, getCurrentThreadPoolSize, getIdleTimeout, getMaxPoolSize, getNumAcceptThreads, getReuseAddress, isTransportBiDirectional, setBacklog, setIdleTimeout, setMaxPoolSize, setNewServerSocketFactory, setNumAcceptThreads, setReuseAddress | 
| Methods inherited from class org.jboss.remoting.AbstractInvoker | 
|---|
addClientLocator, createSocketFactory, getClassLoader, getClientLocator, getClientLocators, getLocator, getSerializationType, getSocketFactory, isCompleteSocketFactory, isSocketFactoryCreatedFromSSLParameters, needsCustomSSLConfiguration, setClassLoader, setSerializationType, setSocketFactory, wrapSocketFactory | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface org.jboss.remoting.transport.socket.SocketServerInvokerMBean | 
|---|
getServerBindPort | 
| Methods inherited from interface org.jboss.remoting.ServerInvokerMBean | 
|---|
create, getClientConnectAddress, getClientConnectPort, getConfiguration, getDataType, getServerBindAddress, getTimeout, isStarted, setClientConnectAddress, setClientConnectPort, setConfiguration, setTimeout | 
| Field Detail | 
|---|
protected static final org.jboss.logging.Logger log
| Constructor Detail | 
|---|
public MultiplexServerInvoker(InvokerLocator locator)
MultiplexServerInvoker.
locator - 
public MultiplexServerInvoker(InvokerLocator locator,
                              java.util.Map configuration)
MultiplexServerInvoker.
protected MultiplexServerInvoker(InvokerLocator locator,
                                 java.util.Map configuration,
                                 java.net.ServerSocket serverSocket,
                                 java.net.Socket socket,
                                 java.util.Map virtualServerInvokers)
MultiplexServerInvoker.
| Method Detail | 
|---|
public static java.util.Map getAddressPairMap()
public static java.util.Map getSocketGroupMap()
protected java.lang.String getDefaultDataType()
getDefaultDataType in class SocketServerInvoker
public void start()
           throws java.io.IOException
SocketServerInvoker
start in interface ServerInvokerMBeanstart in interface SocketServerInvokerMBeanstart in class SocketServerInvokerjava.io.IOExceptionpublic void run()
run in interface java.lang.Runnablerun in class SocketServerInvokerpublic boolean isSafeToShutdown()
public void notifyDisconnected(VirtualSocket virtualSocket)
notifyDisconnected in interface VirtualSocket.DisconnectListenerpublic void stop()
SocketServerInvoker
stop in interface ServerInvokerMBeanstop in interface SocketServerInvokerMBeanstop in class SocketServerInvokerpublic java.lang.String toString()
toString in class SocketServerInvoker
protected void setup()
              throws java.lang.Exception
setup in class SocketServerInvokerjava.lang.Exception
protected void finishStart()
                    throws java.io.IOException
java.io.IOExceptionprotected void resetLocator(int bindPort)
bindPort - 
protected void configureSocketGroupParameters(java.util.Map parameters)
                                       throws java.io.IOException
java.io.IOException
protected static void createPrimingSocket(MultiplexServerInvoker.SocketGroupInfo socketGroupInfo,
                                          java.lang.String connectHost,
                                          int connectPort,
                                          java.util.Map configuration,
                                          int timeout)
                                   throws java.io.IOException
java.io.IOException
protected static void createPrimingSocket(MultiplexServerInvoker.SocketGroupInfo socketGroupInfo,
                                          java.lang.String connectHost,
                                          int connectPort,
                                          java.net.InetAddress bindAddress,
                                          int bindPort,
                                          java.util.Map configuration,
                                          int timeout)
                                   throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getThreadName(int i)
getThreadName in class SocketServerInvoker
protected void processInvocation(java.net.Socket socket)
                          throws java.lang.Exception
SocketServerInvoker
processInvocation in class SocketServerInvokerjava.lang.Exceptionprotected void cleanup()
cleanup in class SocketServerInvoker
protected java.net.ServerSocket createServerSocket(int bindPort,
                                                   int backlog,
                                                   java.net.InetAddress bindAddress)
                                            throws java.io.IOException
createServerSocket() determines whether multiplexing
 will be supported by this ServerInvoker. The determination is made according to the
 presence or absence of certain parameters in the ServerInvoker's locator.  In particular,
 a VirtualServerSocket, which supports multiplexing, needs to connect to a
 remote MasterServerSocket before it can begin to accept connection requests.
 In order to know which MasterServerSocket to connect to,
 it looks for parameters "connectHost" and "connectPort" in the locator.  The presence of these parameters
 indicates that a VirtualServerSocket should be created, and their absence indicates that a
 MasterServerSocket, which does not support multiplexing, should be created.
createServerSocket in class SocketServerInvokerbindPort - backlog - bindAddress - 
java.io.IOException
protected void rule1()
              throws java.io.IOException
java.io.IOException
protected void rule2(java.lang.String connectHost,
                     int connectPort)
              throws java.io.IOException
java.io.IOException
protected void rule3()
              throws java.io.IOException
java.io.IOExceptionprotected void rule4()
protected void refreshServerSocket()
                            throws java.io.IOException
SocketServerInvoker
refreshServerSocket in class SocketServerInvokerjava.io.IOExceptionpublic java.net.ServerSocket getServerSocket()
ServerSocket used to accept invocation requests.
 It is added to facilitate unit tests.
ServerSocket used to accept invocation requests.public MultiplexServerInvoker getServerInvoker(java.net.InetSocketAddress address)
MultiplexServerInvoker in a master
 MultiplexServerInvoker's invoker farm.
public java.util.Collection getServerInvokers()
MultiplexServerInvokers in a master
 MultiplexServerInvoker's invoker farm.
protected void setBindingInfo()
                       throws java.io.IOException
java.io.IOException
protected void getParameters()
                      throws java.lang.Exception
java.lang.Exceptionpublic int getInputBufferSize()
public void setInputBufferSize(int inputBufferSize)
public int getInputMaxErrors()
public void setInputMaxErrors(int inputMaxErrors)
public int getMaxAcceptErrors()
public void setMaxAcceptErrors(int maxAcceptErrors)
public java.lang.String getMultiplexConnectHost()
public int getMultiplexConnectPort()
public int getOutputMaxChunkSize()
public void setOutputMaxChunkSize(int outputMaxChunkSize)
public int getOutputMaxDataSlice()
public void setOutputMaxDataSlice(int outputMaxDataSlice)
public int getOutputMaxTimeSlice()
public void setOutputMaxTimeSlice(int outputMaxTimeSlice)
public int getOutputMessagePoolSize()
public void setOutputMessagePoolSize(int outputMessagePoolSize)
public int getOutputMessageSize()
public void setOutputMessageSize(int outputMessageSize)
public java.lang.String getServerMultiplexId()
public int getShutdownMonitorPeriod()
public void setShutdownMonitorPeriod(int shutdownMonitorPeriod)
public int getShutdownRefusalsMaximum()
public void setShutdownRefusalsMaximum(int shutdownRefusalsMaximum)
public int getShutdownRequestTimeout()
public void setShutdownRequestTimeout(int shutdownRequestTimeout)
public int getStaticThreadsMonitorPeriod()
public void setStaticThreadsMonitorPeriod(int staticThreadsMonitorPeriod)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||