站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 server API Documentation 英文版文档

JRMPInvoker (JBoss Server API) - JBoss 4.0.1 sp1 server API Documentation 英文版文档


org.jboss.invocation.jrmp.server
Class JRMPInvoker

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byorg.jboss.invocation.jrmp.server.JRMPInvoker
All Implemented Interfaces:
Invoker, JRMPInvokerMBean, javax.management.MBeanRegistration, Remote, Serializable, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class JRMPInvoker
extends RemoteServer
implements Invoker, JRMPInvokerMBean, javax.management.MBeanRegistration

The JRMPInvoker is an RMI implementation that can generate Invocations from RMI/JRMP into the JMX base.

Version:
$Revision: 1.38.2.1 $
Author:
Scott Stark
See Also:
Serialized Form

Field Summary
static int ANONYMOUS_PORT
          Identifer to instruct the usage of an anonymous port.
protected  int backlog
          The socket accept backlog
protected  RMIClientSocketFactory clientSocketFactory
          An optional custom client socket factory
protected  String clientSocketFactoryName
          The class name of the optional custom client socket factory
protected  boolean enableClassCaching
          A flag to enable caching of classes in the MarshalledValueInputStream
protected  RemoteStub invokerStub
           
protected  org.jboss.logging.Logger log
          Instance logger.
protected  int rmiPort
          The port the container will be exported on
protected  String serverAddress
          The address to bind the rmi port on
protected  RMIServerSocketFactory serverSocketFactory
          An optional custom server socket factory
protected  String serverSocketFactoryName
          The class name of the optional custom server socket factory
protected  String sslDomain
          The name of the security domain to use with server sockets that support SSL
protected  org.jboss.system.ServiceMBeanSupport support
          Service MBean support delegate.
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface org.jboss.invocation.Invoker
ID
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Constructor Summary
JRMPInvoker()
           
 
Method Summary
 void create()
           
protected  Invoker createDelegateInvoker()
           
 void destroy()
           
protected  void destroyService()
           
protected  void exportCI()
           
 int getBacklog()
           
 boolean getEnableClassCaching()
           
 String getName()
           
 String getRMIClientSocketFactory()
           
 RMIClientSocketFactory getRMIClientSocketFactoryBean()
           
 int getRMIObjectPort()
           
 String getRMIServerSocketFactory()
           
 RMIServerSocketFactory getRMIServerSocketFactoryBean()
           
 String getSecurityDomain()
           
 javax.management.MBeanServer getServer()
           
 String getServerAddress()
           
 String getServerHostName()
          A free form String identifier for this delegate invoker, can be clustered or target node This should evolve in a more advanced meta-inf object
 int getState()
           
 String getStateString()
           
 Serializable getStub()
           
protected  Transaction importTPC(Object tpc)
          Import a transaction propagation context into the local VM, and return the corresponding Transaction.
 Object invoke(Invocation invocation)
          Invoke a Remote interface method.
 void jbossInternalLifecycle(String method)
           
protected  void loadCustomSocketFactories()
          Load and instantiate the clientSocketFactory, serverSocketFactory using the TCL and set the bind address and SSL domain if the serverSocketFactory supports it.
 void postDeregister()
           
 void postRegister(Boolean registrationDone)
           
 void preDeregister()
           
 javax.management.ObjectName preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)
           
protected  void rebind(Context ctx, String name, Object val)
           
 void setBacklog(int back)
           
 void setEnableClassCaching(boolean flag)
           
 void setRMIClientSocketFactory(String name)
           
 void setRMIClientSocketFactoryBean(RMIClientSocketFactory bean)
           
 void setRMIObjectPort(int rmiPort)
           
 void setRMIServerSocketFactory(String name)
           
 void setRMIServerSocketFactoryBean(RMIServerSocketFactory bean)
           
 void setSecurityDomain(String domainName)
           
 void setServerAddress(String address)
           
 void start()
           
protected  void startService()
           
 void stop()
           
protected  void stopService()
           
protected  void unexportCI()
           
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ANONYMOUS_PORT

public static final int ANONYMOUS_PORT
Identifer to instruct the usage of an anonymous port.

See Also:
Constant Field Values

log

protected org.jboss.logging.Logger log
Instance logger.


support

protected org.jboss.system.ServiceMBeanSupport support
Service MBean support delegate.


rmiPort

protected int rmiPort
The port the container will be exported on


clientSocketFactory

protected RMIClientSocketFactory clientSocketFactory
An optional custom client socket factory


serverSocketFactory

protected RMIServerSocketFactory serverSocketFactory
An optional custom server socket factory


clientSocketFactoryName

protected String clientSocketFactoryName
The class name of the optional custom client socket factory


serverSocketFactoryName

protected String serverSocketFactoryName
The class name of the optional custom server socket factory


serverAddress

protected String serverAddress
The address to bind the rmi port on


sslDomain

protected String sslDomain
The name of the security domain to use with server sockets that support SSL


invokerStub

protected RemoteStub invokerStub

backlog

protected int backlog
The socket accept backlog


enableClassCaching

protected boolean enableClassCaching
A flag to enable caching of classes in the MarshalledValueInputStream

Constructor Detail

JRMPInvoker

public JRMPInvoker()
Method Detail

getBacklog

public int getBacklog()
Specified by:
getBacklog in interface JRMPInvokerMBean

setBacklog

public void setBacklog(int back)
Specified by:
setBacklog in interface JRMPInvokerMBean

getEnableClassCaching

public boolean getEnableClassCaching()
Specified by:
getEnableClassCaching in interface JRMPInvokerMBean

setEnableClassCaching

public void setEnableClassCaching(boolean flag)
Specified by:
setEnableClassCaching in interface JRMPInvokerMBean

getServerHostName

public String getServerHostName()
Description copied from interface: Invoker
A free form String identifier for this delegate invoker, can be clustered or target node This should evolve in a more advanced meta-inf object

Specified by:
getServerHostName in interface Invoker
Returns:
The localhost name or null.

setRMIObjectPort

public void setRMIObjectPort(int rmiPort)
Specified by:
setRMIObjectPort in interface JRMPInvokerMBean

getRMIObjectPort

public int getRMIObjectPort()
Specified by:
getRMIObjectPort in interface JRMPInvokerMBean

setRMIClientSocketFactory

public void setRMIClientSocketFactory(String name)
Specified by:
setRMIClientSocketFactory in interface JRMPInvokerMBean

getRMIClientSocketFactory

public String getRMIClientSocketFactory()
Specified by:
getRMIClientSocketFactory in interface JRMPInvokerMBean

setRMIClientSocketFactoryBean

public void setRMIClientSocketFactoryBean(RMIClientSocketFactory bean)
Specified by:
setRMIClientSocketFactoryBean in interface JRMPInvokerMBean

getRMIClientSocketFactoryBean

public RMIClientSocketFactory getRMIClientSocketFactoryBean()
Specified by:
getRMIClientSocketFactoryBean in interface JRMPInvokerMBean

setRMIServerSocketFactory

public void setRMIServerSocketFactory(String name)
Specified by:
setRMIServerSocketFactory in interface JRMPInvokerMBean

getRMIServerSocketFactory

public String getRMIServerSocketFactory()
Specified by:
getRMIServerSocketFactory in interface JRMPInvokerMBean

setRMIServerSocketFactoryBean

public void setRMIServerSocketFactoryBean(RMIServerSocketFactory bean)
Specified by:
setRMIServerSocketFactoryBean in interface JRMPInvokerMBean

getRMIServerSocketFactoryBean

public RMIServerSocketFactory getRMIServerSocketFactoryBean()
Specified by:
getRMIServerSocketFactoryBean in interface JRMPInvokerMBean

setServerAddress

public void setServerAddress(String address)
Specified by:
setServerAddress in interface JRMPInvokerMBean

getServerAddress

public String getServerAddress()
Specified by:
getServerAddress in interface JRMPInvokerMBean

setSecurityDomain

public void setSecurityDomain(String domainName)
Specified by:
setSecurityDomain in interface JRMPInvokerMBean

getSecurityDomain

public String getSecurityDomain()
Specified by:
getSecurityDomain in interface JRMPInvokerMBean

getStub

public Serializable getStub()

startService

protected void startService()
                     throws Exception
Throws:
Exception

stopService

protected void stopService()
                    throws Exception
Throws:
Exception

destroyService

protected void destroyService()
                       throws Exception
Throws:
Exception

invoke

public Object invoke(Invocation invocation)
              throws Exception
Invoke a Remote interface method.

Specified by:
invoke in interface Invoker
Parameters:
invocation - A pointer to the invocation object
Returns:
Return value of method invocation.
Throws:
Exception - Failed to invoke method.

createDelegateInvoker

protected Invoker createDelegateInvoker()

exportCI

protected void exportCI()
                 throws Exception
Throws:
Exception

unexportCI

protected void unexportCI()
                   throws Exception
Throws:
Exception

rebind

protected void rebind(Context ctx,
                      String name,
                      Object val)
               throws NamingException
Throws:
NamingException

loadCustomSocketFactories

protected void loadCustomSocketFactories()
Load and instantiate the clientSocketFactory, serverSocketFactory using the TCL and set the bind address and SSL domain if the serverSocketFactory supports it.


importTPC

protected Transaction importTPC(Object tpc)
Import a transaction propagation context into the local VM, and return the corresponding Transaction.

Returns:
A transaction or null if no tpc.

getName

public String getName()
Specified by:
getName in interface org.jboss.system.ServiceMBean

getServer

public javax.management.MBeanServer getServer()

getState

public int getState()
Specified by:
getState in interface org.jboss.system.ServiceMBean

getStateString

public String getStateString()
Specified by:
getStateString in interface org.jboss.system.ServiceMBean

create

public void create()
            throws Exception
Specified by:
create in interface org.jboss.system.Service
Throws:
Exception

start

public void start()
           throws Exception
Specified by:
start in interface org.jboss.system.Service
Throws:
Exception

stop

public void stop()
Specified by:
stop in interface org.jboss.system.Service

destroy

public void destroy()
Specified by:
destroy in interface org.jboss.system.Service

jbossInternalLifecycle

public void jbossInternalLifecycle(String method)
                            throws Exception
Specified by:
jbossInternalLifecycle in interface org.jboss.system.ServiceMBean
Throws:
Exception

preRegister

public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
                                               javax.management.ObjectName name)
                                        throws Exception
Specified by:
preRegister in interface javax.management.MBeanRegistration
Throws:
Exception

postRegister

public void postRegister(Boolean registrationDone)
Specified by:
postRegister in interface javax.management.MBeanRegistration

preDeregister

public void preDeregister()
                   throws Exception
Specified by:
preDeregister in interface javax.management.MBeanRegistration
Throws:
Exception

postDeregister

public void postDeregister()
Specified by:
postDeregister in interface javax.management.MBeanRegistration


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.