mx4j.tools.naming
Class NamingService
java.lang.Object
mx4j.tools.naming.NamingService
- NamingServiceMBean
public class NamingService
extends java.lang.Object
An MBean that wraps rmiregistry.
Calling
start()
will launch rmiregistry in the same JVM; this way
rmiregistry will have in its classpath the same classes the JVM has.
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.
|
int | getPort() - Returns the port on which rmiregistry listens for incoming connections
|
boolean | isRunning() - Returns whether this MBean has been started and not yet stopped.
|
String[] | list() - Returns an array of the names bound in the rmiregistry
|
void | setPort(int port) - Sets the port on which rmiregistry listens for incoming connections.
|
void | start() - Starts this MBean: rmiregistry can now accept incoming calls
|
void | stop() - Stops this MBean: rmiregistry cannot accept anymore incoming calls
|
void | unbind(String name) - Removes the binding for the specified
name in the rmiregistry
|
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.
getPort
public int getPort()
Returns the port on which rmiregistry listens for incoming connections
- getPort in interface NamingServiceMBean
isRunning
public boolean isRunning()
Returns whether this MBean has been started and not yet stopped.
- isRunning in interface NamingServiceMBean
list
public String[] list()
throws RemoteException
Returns an array of the names bound in the rmiregistry
- list in interface NamingServiceMBean
java.rmi.registry.Registry.list()
setPort
public void setPort(int port)
Sets the port on which rmiregistry listens for incoming connections.
Can be called only if this service is not
running
.
- setPort in interface NamingServiceMBean
start
public void start()
throws RemoteException
Starts this MBean: rmiregistry can now accept incoming calls
- start in interface NamingServiceMBean
stop
public void stop()
throws NoSuchObjectException
Stops this MBean: rmiregistry cannot accept anymore incoming calls
- stop in interface NamingServiceMBean
unbind
public void unbind(String name)
throws RemoteException,
NotBoundException
Removes the binding for the specified name
in the rmiregistry
- unbind in interface NamingServiceMBean
java.rmi.registry.Registry.unbind(String)
Copyright © 2001-2005 The MX4J Contributors. All Rights Reserved.