mx4j.adaptor.rmi
Class RMIAdaptor

java.lang.Object
  |
  +--mx4j.adaptor.rmi.RMIAdaptor
All Implemented Interfaces:
MBeanRegistration, RMIAdaptorMBean
Direct Known Subclasses:
IIOPAdaptor, JRMPAdaptor

public abstract class RMIAdaptor
extends java.lang.Object
implements RMIAdaptorMBean, MBeanRegistration

The RMI adaptor MBean

Version:
$Revision: 1.4 $
Author:
Simone Bordet

Constructor Summary
RMIAdaptor()
           
 
Method Summary
 void addInterceptor(Interceptor interceptor)
          Adds an interceptor to this RMI adaptor
protected  void bind(java.lang.Object adaptor)
           
 void clearNamingProperties()
          Reset the naming properties set for this adaptor.
protected abstract  ObjectName getDefaultObjectName()
           
 java.lang.String getHostName()
          Returns the host name on which this adaptor is running
protected  java.util.List getInterceptors()
           
 java.lang.String getJNDIName()
          Returns the JNDI name under which this RMI Adaptor is registered
protected  MBeanServer getMBeanServer()
           
 java.util.Properties getNamingProperties()
           
protected  ObjectName getObjectName()
           
 void postDeregister()
           
 void postRegister(java.lang.Boolean registrationDone)
           
 void preDeregister()
           
 ObjectName preRegister(MBeanServer server, ObjectName name)
           
 void putNamingProperty(java.lang.Object property, java.lang.Object value)
          Puts a JNDI naming property for this adaptor.
 void setJNDIName(java.lang.String name)
          Sets the JNDI name under which the RMI adaptor should be registered.
 void setMBeanServer(MBeanServer server)
          Sets the target MBeanServer in case this adaptor is not registered with it
protected  void unbind()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface mx4j.adaptor.rmi.RMIAdaptorMBean
isRunning, start, stop
 

Constructor Detail

RMIAdaptor

public RMIAdaptor()
Method Detail

preRegister

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

postRegister

public void postRegister(java.lang.Boolean registrationDone)
Specified by:
postRegister in interface MBeanRegistration

preDeregister

public void preDeregister()
                   throws java.lang.Exception
Specified by:
preDeregister in interface MBeanRegistration

postDeregister

public void postDeregister()
Specified by:
postDeregister in interface MBeanRegistration

getJNDIName

public java.lang.String getJNDIName()
Description copied from interface: RMIAdaptorMBean
Returns the JNDI name under which this RMI Adaptor is registered
Specified by:
getJNDIName in interface RMIAdaptorMBean

setJNDIName

public void setJNDIName(java.lang.String name)
Description copied from interface: RMIAdaptorMBean
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

putNamingProperty

public void putNamingProperty(java.lang.Object property,
                              java.lang.Object value)
Description copied from interface: RMIAdaptorMBean
Puts a JNDI naming property for this adaptor.
This method can be called only if this adaptor is not running.
Specified by:
putNamingProperty in interface RMIAdaptorMBean
Following copied from interface: mx4j.adaptor.rmi.RMIAdaptorMBean
See Also:
RMIAdaptorMBean.clearNamingProperties()

clearNamingProperties

public void clearNamingProperties()
Description copied from interface: RMIAdaptorMBean
Reset the naming properties set for this adaptor.
This method can be called only if this adaptor is not running.
Specified by:
clearNamingProperties in interface RMIAdaptorMBean
Following copied from interface: mx4j.adaptor.rmi.RMIAdaptorMBean
See Also:
RMIAdaptorMBean.putNamingProperty(java.lang.Object, java.lang.Object)

getHostName

public java.lang.String getHostName()
Description copied from interface: RMIAdaptorMBean
Returns the host name on which this adaptor is running
Specified by:
getHostName in interface RMIAdaptorMBean

addInterceptor

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

setMBeanServer

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

getInterceptors

protected java.util.List getInterceptors()

getNamingProperties

public java.util.Properties getNamingProperties()

getMBeanServer

protected MBeanServer getMBeanServer()

getObjectName

protected ObjectName getObjectName()

getDefaultObjectName

protected abstract ObjectName getDefaultObjectName()
                                            throws MalformedObjectNameException

bind

protected void bind(java.lang.Object adaptor)
             throws javax.naming.NamingException

unbind

protected void unbind()
               throws javax.naming.NamingException