mx4j.tools.naming

Class NamingService

Implemented Interfaces:
NamingServiceMBean

public class NamingService
extends java.lang.Object
implements NamingServiceMBean

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.

Version:
$Revision: 1.10 $

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.

Method Summary

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.
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

Constructor Details

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.

Method Details

getPort

public int getPort()
Returns the port on which rmiregistry listens for incoming connections
Specified by:
getPort in interface NamingServiceMBean

See Also:
setPort(int)


isRunning

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

See Also:
start()


setPort

public void setPort(int port)
Sets the port on which rmiregistry listens for incoming connections.
Specified by:
setPort in interface NamingServiceMBean

See Also:
getPort()


start

public void start()
            throws RemoteException
Starts this MBean: rmiregistry can now accept incoming calls
Specified by:
start in interface NamingServiceMBean

See Also:
stop(), isRunning()


stop

public void stop()
            throws NoSuchObjectException
Stops this MBean: rmiregistry cannot accept anymore incoming calls
Specified by:
stop in interface NamingServiceMBean

See Also:
start()


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