mx4j.tools.adaptor.rmi

Class RMIAdaptor

Implemented Interfaces:
Invocable, javax.management.MBeanRegistration, Remote, RemoteAdaptor, RMIAdaptorMBean
Known Direct Subclasses:
JRMPAdaptor

public abstract class RMIAdaptor
extends RemoteObject
implements RMIAdaptorMBean, javax.management.MBeanRegistration, RemoteAdaptor

The RMI adaptor MBean, base for the JRMP and IIOP protocol

Version:
$Revision: 1.3 $

Method Summary

void
addInterceptor(Interceptor interceptor)
Adds an interceptor to this RMI adaptor
protected void
bind(Object adaptor)
void
clearJNDIProperties()
Resets the JNDI properties set for this adaptor.
void
clearNamingProperties()
Deprecated. Replaced by clearJNDIProperties()
String
getHostAddress()
Returns the host address on which this adaptor is running
String
getHostName()
Returns the host name on which this adaptor is running
String
getJNDIName()
Returns the JNDI name under which this RMI Adaptor is registered
Properties
getJNDIProperties()
Returns the JNDI properties for this adaptor.
protected javax.management.MBeanServer
getMBeanServer()
Properties
getNamingProperties()
Deprecated. Replaced by getJNDIProperties()
protected javax.management.ObjectName
getObjectName()
String
getProtocol()
Returns the protocol of this adaptor
protected void
installInterceptors()
InvocationResult
invoke(Invocation invocation)
Invocation method
boolean
isRunning()
Returns whether this adaptor has been started and not been stopped.
void
postDeregister()
void
postRegister(Boolean registrationDone)
void
preDeregister()
javax.management.ObjectName
preRegister(javax.management.MBeanServer server, javax.management.ObjectName name)
void
putJNDIProperty(Object property, Object value)
Puts a JNDI property in the environment for the JNDI Initial Context used by this adaptor.
void
putNamingProperty(Object property, Object value)
Deprecated. Replaced by {link #putJNDIProperty}
void
setJNDIName(String name)
Sets the JNDI name under which the RMI adaptor should be registered.
void
setMBeanServer(javax.management.MBeanServer server)
Sets the target MBeanServer in case this adaptor is not registered with it
void
start()
Starts this adaptor, so that it can accept incoming calls
void
stop()
Stops this adaptor, so that it does not accept incoming calls anymore
protected void
unbind()
protected void
uninstallInterceptors()

Method Details

addInterceptor

public void addInterceptor(Interceptor interceptor)
Adds an interceptor to this RMI adaptor


bind

protected void bind(Object adaptor)
            throws NamingException


clearJNDIProperties

public void clearJNDIProperties()
Resets the JNDI properties set for this adaptor.
This method can be called only if this adaptor is not running.
Specified by:
clearJNDIProperties in interface RMIAdaptorMBean

See Also:
putJNDIProperty(Object,Object)


clearNamingProperties

public void clearNamingProperties()

Deprecated. Replaced by clearJNDIProperties()

Specified by:
clearNamingProperties in interface RMIAdaptorMBean


getHostAddress

public String getHostAddress()
Returns the host address on which this adaptor is running
Specified by:
getHostAddress in interface RMIAdaptorMBean
getHostAddress in interface RemoteAdaptor


getHostName

public String getHostName()
Returns the host name on which this adaptor is running
Specified by:
getHostName in interface RMIAdaptorMBean
getHostName in interface RemoteAdaptor


getJNDIName

public String getJNDIName()
Returns the JNDI name under which this RMI Adaptor is registered
Specified by:
getJNDIName in interface RMIAdaptorMBean


getJNDIProperties

public Properties getJNDIProperties()
Returns the JNDI properties for this adaptor.
Specified by:
getJNDIProperties in interface RMIAdaptorMBean

See Also:
putJNDIProperty(Object,Object)


getMBeanServer

protected javax.management.MBeanServer getMBeanServer()


getNamingProperties

public Properties getNamingProperties()

Deprecated. Replaced by getJNDIProperties()

Specified by:
getNamingProperties in interface RMIAdaptorMBean


getObjectName

protected javax.management.ObjectName getObjectName()


getProtocol

public String getProtocol()
Returns the protocol of this adaptor
Specified by:
getProtocol in interface RMIAdaptorMBean


installInterceptors

protected void installInterceptors()


invoke

public InvocationResult invoke(Invocation invocation)
            throws Exception
Invocation method
Specified by:
invoke in interface Invocable


isRunning

public boolean isRunning()
Returns whether this adaptor has been started and not been stopped.
Specified by:
isRunning in interface RMIAdaptorMBean

See Also:
stop()


postDeregister

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


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


preRegister

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


putJNDIProperty

public void putJNDIProperty(Object property,
                            Object value)
Puts a JNDI property in the environment for the JNDI Initial Context used by this adaptor.
This method can be called only if this adaptor is not running.
Specified by:
putJNDIProperty in interface RMIAdaptorMBean

See Also:
clearJNDIProperties()


putNamingProperty

public void putNamingProperty(Object property,
                              Object value)

Deprecated. Replaced by {link #putJNDIProperty}

Specified by:
putNamingProperty in interface RMIAdaptorMBean


setJNDIName

public void setJNDIName(String name)
Sets the JNDI name under which the RMI adaptor should be registered.
This method can be called only if this adaptor is not running.
Specified by:
setJNDIName in interface RMIAdaptorMBean


setMBeanServer

public void setMBeanServer(javax.management.MBeanServer server)
Sets the target MBeanServer in case this adaptor is not registered with it


start

public void start()
            throws Exception
Starts this adaptor, so that it can accept incoming calls
Specified by:
start in interface RMIAdaptorMBean

See Also:
stop(), isRunning()


stop

public void stop()
            throws Exception
Stops this adaptor, so that it does not accept incoming calls anymore
Specified by:
stop in interface RMIAdaptorMBean

See Also:
start()


unbind

protected void unbind()
            throws NamingException


uninstallInterceptors

protected void uninstallInterceptors()


Copyright © 2001-2003 MX4J Team. All Rights Reserved.