org.jboss.remoting.transport.rmi
Class RMIServerInvoker

java.lang.Object
  extended byorg.jboss.remoting.AbstractInvoker
      extended byorg.jboss.remoting.ServerInvoker
          extended byorg.jboss.remoting.transport.rmi.RMIServerInvoker
All Implemented Interfaces:
Invoker, java.rmi.Remote, RMIServerInvokerInf, ServerInvokerMBean

public class RMIServerInvoker
extends ServerInvoker
implements RMIServerInvokerInf

RMIServerInvoker

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

Field Summary
static int BACKLOG_DEFAULT
           
static int DEFAULT_REGISTRY_PORT
           
static java.lang.String REGISTRY_PORT_KEY
           
static java.lang.String SOCKET_FACTORY
           
 
Fields inherited from class org.jboss.remoting.ServerInvoker
callbackHandlers, CLIENT_CONNECT_ADDRESS_KEY, CLIENT_CONNECT_PORT_KEY, CLIENT_LEASE_PERIOD, clientCallbackListener, DEFAULT_CLIENT_LEASE_PERIOD, handlers, MAX_NUM_ONEWAY_THREADS, MAX_NUM_ONEWAY_THREADS_KEY, ONEWAY_THREAD_POOL_CLASS_KEY, SERVER_BIND_ADDRESS_KEY, SERVER_BIND_PORT_KEY, SERVER_SOCKET_FACTORY, TIMEOUT
 
Fields inherited from class org.jboss.remoting.AbstractInvoker
classbyteloader, configuration, localServerLocators, locator, log, serializationType
 
Constructor Summary
RMIServerInvoker(InvokerLocator locator)
           
RMIServerInvoker(InvokerLocator locator, java.util.Map configuration)
           
 
Method Summary
protected  javax.net.SocketFactory createSocketFactory()
           
 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()
           
 javax.net.SocketFactory getSocketFactory()
           
 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 setSocketFactory(javax.net.SocketFactory factory)
           
protected  void setup()
           
 java.lang.Object transport(java.lang.Object invocation)
          transport a buffer via RMI
 
Methods inherited from class org.jboss.remoting.ServerInvoker
addConnectionListener, addInvocationHandler, create, createServerSocketFactory, getClientConnectAddress, getClientConnectPort, getConfiguration, getDataType, getDefaultServerSocketFactory, getInvocationHandler, getInvocationHandlers, getLeasePeriod, getMaxNumberOfOnewayThreads, getMBeanObjectName, getMBeanServer, getOnewayThreadPool, getServerBindAddress, getServerBindPort, getServerSocketFactory, getSupportedSubsystems, getTimeout, hasInvocationHandler, invoke, invoke, isStarted, postProcess, preProcess, removeCallbackListener, removeConnectionListener, removeInvocationHandler, setClientConnectAddress, setClientConnectPort, setConfiguration, setLeasePeriod, setMaxNumberOfOnewayThreads, setMBeanServer, setOnewayThreadPool, setServerSocketFactory, setTimeout, start, stop
 
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
 

Field Detail

SOCKET_FACTORY

public static final java.lang.String SOCKET_FACTORY
See Also:
Constant Field Values

BACKLOG_DEFAULT

public static final int BACKLOG_DEFAULT
See Also:
Constant Field Values

DEFAULT_REGISTRY_PORT

public static final int DEFAULT_REGISTRY_PORT
See Also:
Constant Field Values

REGISTRY_PORT_KEY

public static final java.lang.String REGISTRY_PORT_KEY
See Also:
Constant Field Values
Constructor Detail

RMIServerInvoker

public RMIServerInvoker(InvokerLocator locator)

RMIServerInvoker

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

setup

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

getSocketFactory

public javax.net.SocketFactory getSocketFactory()
                                         throws java.io.IOException
Throws:
java.io.IOException

setSocketFactory

public void setSocketFactory(javax.net.SocketFactory factory)

createSocketFactory

protected javax.net.SocketFactory createSocketFactory()
                                               throws java.io.IOException
Throws:
java.io.IOException

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
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
Parameters:
invocation -
Returns:
Throws:
java.rmi.RemoteException
java.io.IOException


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