org.apache.hivemind.management.mbeans
Class NamingService
java.lang.Object
org.apache.hivemind.management.mbeans.NamingService
- All Implemented Interfaces:
- javax.management.MBeanRegistration, NamingServiceMBean
public class NamingService
- extends java.lang.Object
- implements NamingServiceMBean, javax.management.MBeanRegistration
MBean that starts an rmiregistry.
Calling start()
will launch rmiregistry in the same JVM; this way rmiregistry will have in
its classpath the same classes the JVM has.
- Since:
- 1.1
- Author:
- Achim Huegen
Constructor Summary |
NamingService()
Creates a new instance of NamingService with the default rmiregistry port (1099). |
NamingService(int port)
Creates a new instance of NamingService with the specified port. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NamingService
public NamingService()
- Creates a new instance of NamingService with the default rmiregistry port (1099).
NamingService
public NamingService(int port)
- Creates a new instance of NamingService with the specified port.
setPort
public void setPort(int port)
- Specified by:
setPort
in interface NamingServiceMBean
getPort
public int getPort()
- Specified by:
getPort
in interface NamingServiceMBean
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interface NamingServiceMBean
start
public void start()
throws java.rmi.RemoteException
- Specified by:
start
in interface NamingServiceMBean
- Throws:
java.rmi.RemoteException
stop
public void stop()
throws java.rmi.NoSuchObjectException
- Specified by:
stop
in interface NamingServiceMBean
- Throws:
java.rmi.NoSuchObjectException
preRegister
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
- Specified by:
preRegister
in interface javax.management.MBeanRegistration
- Throws:
java.lang.Exception
- See Also:
MBeanRegistration.preRegister(javax.management.MBeanServer,
javax.management.ObjectName)
postRegister
public void postRegister(java.lang.Boolean arg0)
- Specified by:
postRegister
in interface javax.management.MBeanRegistration
- See Also:
MBeanRegistration.postRegister(java.lang.Boolean)
preDeregister
public void preDeregister()
throws java.lang.Exception
- Specified by:
preDeregister
in interface javax.management.MBeanRegistration
- Throws:
java.lang.Exception
- See Also:
MBeanRegistration.preDeregister()
postDeregister
public void postDeregister()
- Specified by:
postDeregister
in interface javax.management.MBeanRegistration
- See Also:
MBeanRegistration.postDeregister()