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.rmi.Remote, Invoker, ServerInvokerMBean, RMIServerInvokerInf
Direct Known Subclasses:
SSLRMIServerInvoker

public class RMIServerInvoker
extends ServerInvoker
implements RMIServerInvokerInf

RMIServerInvoker

Version:
$Revision: 5238 $
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.
static java.lang.String REGISTRY_PORT_KEY
          Key for port on which rmi registry should be started on.
 
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, CONNECTION_LISTENER, connectionNotifier, DEFAULT_BLOCKING_TIMEOUT, DEFAULT_CLIENT_LEASE_PERIOD, DEFAULT_TIMEOUT_PERIOD, handlers, 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, useClientConnectionIdentity
 
Fields inherited from class org.jboss.remoting.AbstractInvoker
classbyteloader, configuration, localServerLocators, locator, passConfigMapToMarshalFactory, serializationType, socketFactory, socketFactoryCreatedFromSSLParameters
 
Constructor Summary
RMIServerInvoker(InvokerLocator locator)
           
RMIServerInvoker(InvokerLocator locator, java.util.Map configuration)
           
 
Method Summary
 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  java.rmi.server.RMIClientSocketFactory getRMIClientSocketFactory(java.lang.String clientConnectHost)
           
 java.rmi.Remote getStub()
           
 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 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, create, createServerSocketFactory, findInvocationHandler, getClientConnectAddress, getClientConnectPort, getConfiguration, getConnectionNotifier, getDataType, getDefaultServerSocketFactory, getInvocationHandler, getInvocationHandlers, getLease, getLeasePeriod, getMaxNumberOfOnewayThreads, getMBeanObjectName, getMBeanServer, getOnewayThreadPool, getServerBindAddress, getServerBindPort, getServerSocketFactory, getSupportedSubsystems, getTimeout, handleInternalInvocation, hasInvocationHandler, invoke, invoke, isLeaseActivated, isRegisterCallbackListeners, isStarted, isUseClientConnectionIdentity, justNeedsSSLClientMode, postProcess, preProcess, removeCallbackHandler, removeCallbackListener, removeConnectionListener, removeInvocationHandler, setClientConnectAddress, setClientConnectPort, setConfiguration, setConnectionListener, setLeasePeriod, setMaxNumberOfOnewayThreads, setMBeanServer, setOnewayThreadPool, setRegisterCallbackListeners, setServerSocketFactory, setTimeout, setup, setUseClientConnectionIdentity, shutdownCallbackHandler, stop, wrapServerSocketFactory
 
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, toString, wait, wait, wait
 

Field Detail

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

getRMIClientSocketFactory

protected java.rmi.server.RMIClientSocketFactory 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


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