|
||||||||||
| 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
| Nested Class Summary | |
|---|---|
static class |
MultiplexServerInvoker.SocketGroupInfo
|
| 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, maxPoolSize, numAcceptThreads, running, SERVER_SOCKET_CLASS_FLAG, serverSocket, threadpool, trace |
| Fields inherited from class org.jboss.remoting.AbstractInvoker |
|---|
classbyteloader, configuration, localServerLocators, locator, serializationType |
| Fields inherited from interface org.jboss.remoting.transport.multiplex.MultiplexInvokerConstants |
|---|
CLIENT_MULTIPLEX_ID_KEY, MULTIPLEX_BIND_HOST_KEY, MULTIPLEX_BIND_PORT_KEY, MULTIPLEX_CONNECT_HOST_KEY, MULTIPLEX_CONNECT_PORT_KEY, SERVER_MULTIPLEX_ID_KEY |
| 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,
javax.net.SocketFactory socketFactory,
int timeout)
|
protected static void |
createPrimingSocket(MultiplexServerInvoker.SocketGroupInfo socketGroupInfo,
java.lang.String connectHost,
int connectPort,
javax.net.SocketFactory socketFactory,
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 javax.net.SocketFactory |
createSocketFactory(java.util.Map configuration)
If any configuration parameters relate to the construction of a RemotingSSLSocketFactory, create one. |
protected void |
finishStart()
FIXME Comment this |
static java.util.Map |
getAddressPairMap()
FIXME Comment this |
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. |
MultiplexServerInvoker |
getServerInvoker(java.net.InetSocketAddress address)
FIXME Comment this |
java.util.Collection |
getServerInvokers()
FIXME Comment this |
java.net.ServerSocket |
getServerSocket()
Returns ServerSocket used to accept invocation requests. |
static java.util.Map |
getSocketGroupMap()
FIXME Comment this |
protected java.lang.String |
getThreadName(int i)
|
boolean |
isSafeToShutdown()
|
void |
notifyDisconnected(VirtualSocket virtualSocket)
|
protected void |
processInvocation(java.net.Socket socket)
|
void |
run()
|
protected void |
setBindingInfo()
FIXME Comment this |
protected void |
setup()
|
void |
start()
Starts the invoker. |
void |
stop()
Stops the invoker. |
| Methods inherited from class org.jboss.remoting.transport.socket.SocketServerInvoker |
|---|
destroy, finalize, getBacklog, getCurrentClientPoolSize, getCurrentThreadPoolSize, getMaxPoolSize, getNumAcceptThreads, isTransportBiDirectional, setBacklog, setMaxPoolSize, setNumAcceptThreads |
| Methods inherited from class org.jboss.remoting.AbstractInvoker |
|---|
addClientLocator, getClassLoader, getClientLocator, getLocator, getSerializationType, setClassLoader, setSerializationType |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, 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)
locator -
public MultiplexServerInvoker(InvokerLocator locator,
java.util.Map configuration)
throws java.io.IOException
locator - configuration -
java.io.IOException
protected MultiplexServerInvoker(InvokerLocator locator,
java.util.Map configuration,
java.net.ServerSocket serverSocket,
java.net.Socket socket,
java.util.Map virtualServerInvokers)
locator - configuration - serverSocket - virtualServerInvokers - TODOprimintSocket - TODO| 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 SocketServerInvoker
protected void setup()
throws java.lang.Exception
setup in class SocketServerInvokerjava.lang.Exception
protected void finishStart()
throws java.io.IOException
java.io.IOException
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,
javax.net.SocketFactory socketFactory,
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,
javax.net.SocketFactory socketFactory,
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
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.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)
address -
public java.util.Collection getServerInvokers()
protected void setBindingInfo()
throws java.io.IOException
java.io.IOException
protected javax.net.SocketFactory createSocketFactory(java.util.Map configuration)
throws java.io.IOException
configuration -
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||