org.jboss.remoting.transport.rmi
Class RMIServerInvoker

java.lang.Object
  extended by org.jboss.remoting.AbstractInvoker
      extended by org.jboss.remoting.ServerInvoker
          extended by org.jboss.remoting.transport.rmi.RMIServerInvoker
All Implemented Interfaces:
java.lang.Cloneable, java.rmi.Remote, Invoker, ServerInvokerMBean, RMIServerInvokerInf
Direct Known Subclasses:
SSLRMIServerInvoker

public class RMIServerInvoker
extends ServerInvoker
implements RMIServerInvokerInf, java.lang.Cloneable

RMIServerInvoker

Version:
$Revision: 5017 $
Author:
Jeff Haynie, Tom Elrod

Nested Class Summary
 
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
static int BACKLOG_DEFAULT
          Default for how many connections are queued.
static int DEFAULT_REGISTRY_PORT
          Default port on which rmi registry will be started.
protected  boolean isPrimaryServer
           
static java.lang.String REGISTRY_PORT_KEY
          Key for port on which rmi registry should be started on.
static java.lang.String RMI_ONEWAY_MARSHALLING
           
protected  boolean rmiOnewayMarshalling
           
protected  java.util.Set secondaryServers
           
 
Fields inherited from class org.jboss.remoting.ServerInvoker
BLOCKING, BLOCKING_MODE, BLOCKING_TIMEOUT, callbackHandlers, CLIENT_CONNECT_ADDRESS_KEY, CLIENT_CONNECT_PORT_KEY, CLIENT_LEASE_PERIOD, clientCallbackListener, connectHomes, CONNECTION_LISTENER, connectionNotifier, DEFAULT_BLOCKING_TIMEOUT, DEFAULT_CLIENT_LEASE_PERIOD, DEFAULT_TIMEOUT_PERIOD, ECHO, handlers, homes, INVOKER_SESSION_ID, MAX_NUM_ONEWAY_THREADS, MAX_NUM_ONEWAY_THREADS_KEY, MAX_ONEWAY_THREAD_POOL_QUEUE_SIZE, NONBLOCKING, ONEWAY_THREAD_POOL_CLASS_KEY, REGISTER_CALLBACK_LISTENER, registerCallbackListeners, SERVER_BIND_ADDRESS_KEY, SERVER_BIND_PORT_KEY, SERVER_SOCKET_FACTORY, serverSocketFactory, singleCallbackContainer, singleHandler, started, TIMEOUT
 
Fields inherited from class org.jboss.remoting.AbstractInvoker
classbyteloader, configuration, localServerLocators, locator, serializationType, socketFactory, socketFactoryCreatedFromSSLParameters, version
 
Constructor Summary
RMIServerInvoker(InvokerLocator locator)
           
RMIServerInvoker(InvokerLocator locator, java.util.Map configuration)
           
 
Method Summary
protected  RMIServerInvoker copy()
           
 void destroy()
          destroy the RMI Server Invoker, which will unexport the RMI server
protected  void finalize()
           
protected  java.lang.String getDefaultDataType()
           
protected  javax.net.SocketFactory getDefaultSocketFactory()
           
protected  RemotingRMIClientSocketFactory getRMIClientSocketFactory(java.lang.String clientConnectHost)
           
 java.rmi.Remote getStub()
           
protected  void initRMI(Home bindHome, Home connectHome)
           
 boolean isRmiOnewayMarshalling()
           
 boolean isTransportBiDirectional()
          returns true if the transport is bi-directional in nature, for example, SOAP in unidirectional and SOCKETs are bi-directional (unless behind a firewall for example).
 void setRmiOnewayMarshalling(boolean rmiOnewayMarshalling)
           
protected  void setup()
           
 void start()
          Subclasses should override to provide any specific start logic.
 java.lang.Object transport(java.lang.Object invocation)
          transport a buffer via RMI
 
Methods inherited from class org.jboss.remoting.ServerInvoker
addConnectionListener, addInvocationHandler, assignPort, assignPorts, create, createHomeCollection, createServerSocketFactory, findInvocationHandler, getClientConnectAddress, getClientConnectPort, getConfiguration, getConnectHomes, getDataType, getDefaultServerSocketFactory, getHomes, getInvocationHandler, getInvocationHandlers, getLease, getLeasePeriod, getMaxNumberOfOnewayThreads, getMBeanObjectName, getMBeanServer, getOnewayThreadPool, getServerBindAddress, getServerBindPort, getServerSocketFactory, getSupportedSubsystems, getTimeout, handleInternalInvocation, hasInvocationHandler, invoke, invoke, isLeaseActivated, isRegisterCallbackListeners, isStarted, justNeedsSSLClientMode, postProcess, preProcess, removeCallbackHandler, removeCallbackListener, removeConnectionListener, removeInvocationHandler, setClientConnectAddress, setClientConnectPort, setConfiguration, setConnectHomes, setConnectionListener, setHomes, setLeasePeriod, setMaxNumberOfOnewayThreads, setMBeanServer, setOnewayThreadPool, setRegisterCallbackListeners, setServerSocketFactory, setTimeout, setupHomes, shutdownCallbackHandler, stop, wrapServerSocketFactory
 
Methods inherited from class org.jboss.remoting.AbstractInvoker
addClientLocator, createSocketFactory, getClassLoader, getClientLocator, getClientLocators, getLocator, getSerializationType, getSocketFactory, getVersion, isCompleteSocketFactory, isSocketFactoryCreatedFromSSLParameters, needsCustomSSLConfiguration, setClassLoader, setSerializationType, setSocketFactory, setVersion, wrapSocketFactory
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RMI_ONEWAY_MARSHALLING

public static java.lang.String RMI_ONEWAY_MARSHALLING

isPrimaryServer

protected boolean isPrimaryServer

secondaryServers

protected java.util.Set secondaryServers

rmiOnewayMarshalling

protected boolean rmiOnewayMarshalling

BACKLOG_DEFAULT

public static final int BACKLOG_DEFAULT
Default for how many connections are queued. Value is 200.

See Also:
Constant Field Values

DEFAULT_REGISTRY_PORT

public static final int DEFAULT_REGISTRY_PORT
Default port on which rmi registry will be started. Value is 3455.

See Also:
Constant Field Values

REGISTRY_PORT_KEY

public static final java.lang.String REGISTRY_PORT_KEY
Key for port on which rmi registry should be started on.

See Also:
Constant Field Values
Constructor Detail

RMIServerInvoker

public RMIServerInvoker(InvokerLocator locator)

RMIServerInvoker

public RMIServerInvoker(InvokerLocator locator,
                        java.util.Map configuration)
Method Detail

start

public void start()
           throws java.io.IOException
Description copied from class: ServerInvoker
Subclasses should override to provide any specific start logic.

Specified by:
start in interface ServerInvokerMBean
Overrides:
start in class ServerInvoker
Throws:
java.io.IOException

setup

protected void setup()
              throws java.lang.Exception
Overrides:
setup in class ServerInvoker
Throws:
java.lang.Exception

copy

protected RMIServerInvoker copy()
                         throws java.io.IOException
Throws:
java.io.IOException

initRMI

protected void initRMI(Home bindHome,
                       Home connectHome)
                throws java.io.IOException
Throws:
java.io.IOException

getRMIClientSocketFactory

protected RemotingRMIClientSocketFactory getRMIClientSocketFactory(java.lang.String clientConnectHost)

getDefaultSocketFactory

protected javax.net.SocketFactory getDefaultSocketFactory()

getDefaultDataType

protected java.lang.String getDefaultDataType()
Specified by:
getDefaultDataType in class ServerInvoker

destroy

public void destroy()
destroy the RMI Server Invoker, which will unexport the RMI server

Specified by:
destroy in interface ServerInvokerMBean
Overrides:
destroy in class ServerInvoker

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

isTransportBiDirectional

public boolean isTransportBiDirectional()
returns true if the transport is bi-directional in nature, for example, SOAP in unidirectional and SOCKETs are bi-directional (unless behind a firewall for example).

Specified by:
isTransportBiDirectional in interface ServerInvokerMBean
Returns:

getStub

public final java.rmi.Remote getStub()

transport

public java.lang.Object transport(java.lang.Object invocation)
                           throws java.rmi.RemoteException,
                                  java.io.IOException
Description copied from interface: RMIServerInvokerInf
transport a buffer via RMI

Specified by:
transport in interface RMIServerInvokerInf
Returns:
Throws:
java.rmi.RemoteException
java.io.IOException

isRmiOnewayMarshalling

public boolean isRmiOnewayMarshalling()

setRmiOnewayMarshalling

public void setRmiOnewayMarshalling(boolean rmiOnewayMarshalling)


Copyright ? 1998-2005 JBoss Inc . All Rights Reserved.