01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package mx4j.tools.naming;
10:
11: import java.rmi.NoSuchObjectException;
12: import java.rmi.NotBoundException;
13: import java.rmi.RemoteException;
14:
15: /**
16: * Management interface for the NamingService MBean.
17: *
18: * @version $Revision: 1.7 $
19: */
20: public interface NamingServiceMBean {
21: /**
22: * Sets the port on which rmiregistry listens for incoming connections.
23: * Can be called only if this service is not {@link #isRunning() running}.
24: *
25: * @see #getPort
26: */
27: public void setPort(int port);
28:
29: /**
30: * Returns the port on which rmiregistry listens for incoming connections
31: *
32: * @see #setPort
33: */
34: public int getPort();
35:
36: /**
37: * Returns whether this MBean has been started and not yet stopped.
38: *
39: * @see #start
40: */
41: public boolean isRunning();
42:
43: /**
44: * Starts this MBean: rmiregistry can now accept incoming calls
45: *
46: * @see #stop
47: * @see #isRunning
48: */
49: public void start() throws RemoteException;
50:
51: /**
52: * Stops this MBean: rmiregistry cannot accept anymore incoming calls
53: *
54: * @see #start
55: */
56: public void stop() throws NoSuchObjectException;
57:
58: /**
59: * Returns an array of the names bound in the rmiregistry
60: *
61: * @see java.rmi.registry.Registry#list()
62: */
63: public String[] list() throws RemoteException;
64:
65: /**
66: * Removes the binding for the specified <code>name</code> in the rmiregistry
67: *
68: * @see java.rmi.registry.Registry#unbind(String)
69: */
70: public void unbind(String name) throws RemoteException,
71: NotBoundException;
72: }
|