mx4j.tools.naming
Class NamingService

java.lang.Object
  |
  +--mx4j.tools.naming.NamingService
All Implemented Interfaces:
MBeanRegistration, NamingServiceMBean

public class NamingService
extends java.lang.Object
implements NamingServiceMBean, MBeanRegistration

Version:
$Revision: 1.2 $
Author:
Simone Bordet

Fields inherited from interface mx4j.tools.naming.NamingServiceMBean
OBJECT_NAME
 
Constructor Summary
NamingService()
           
NamingService(int port)
           
 
Method Summary
 int getPort()
          Returns the port on which the rmiregistry is running
 boolean isRunning()
          Returns whether this MBean has been started and not yet stopped.
 void postDeregister()
           
 void postRegister(java.lang.Boolean registrationDone)
           
 void preDeregister()
           
 ObjectName preRegister(MBeanServer server, ObjectName name)
           
 void setPort(int port)
          Sets the port on which the rmiregistry will run.
 void start()
          Starts the rmiregistry, that now can accept incoming calls
 void stop()
          Stops the rmiregistry, that now cannot accept anymore incoming calls
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamingService

public NamingService()

NamingService

public NamingService(int port)
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

setPort

public void setPort(int port)
Description copied from interface: NamingServiceMBean
Sets the port on which the rmiregistry will run.
Specified by:
setPort in interface NamingServiceMBean

getPort

public int getPort()
Description copied from interface: NamingServiceMBean
Returns the port on which the rmiregistry is running
Specified by:
getPort in interface NamingServiceMBean

isRunning

public boolean isRunning()
Description copied from interface: NamingServiceMBean
Returns whether this MBean has been started and not yet stopped.
Specified by:
isRunning in interface NamingServiceMBean
Following copied from interface: mx4j.tools.naming.NamingServiceMBean
See Also:
NamingServiceMBean.start()

start

public void start()
           throws java.rmi.RemoteException
Description copied from interface: NamingServiceMBean
Starts the rmiregistry, that now can accept incoming calls
Specified by:
start in interface NamingServiceMBean
Following copied from interface: mx4j.tools.naming.NamingServiceMBean
See Also:
NamingServiceMBean.stop()

stop

public void stop()
          throws java.rmi.NoSuchObjectException
Description copied from interface: NamingServiceMBean
Stops the rmiregistry, that now cannot accept anymore incoming calls
Specified by:
stop in interface NamingServiceMBean
Following copied from interface: mx4j.tools.naming.NamingServiceMBean
See Also:
NamingServiceMBean.start()