KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > tools > naming > NamingServiceMBean


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.tools.naming;
10
11 import java.rmi.NoSuchObjectException JavaDoc;
12 import java.rmi.NotBoundException JavaDoc;
13 import java.rmi.RemoteException JavaDoc;
14
15 /**
16  * Management interface for the NamingService MBean.
17  *
18  * @version $Revision: 1.7 $
19  */

20 public interface NamingServiceMBean
21 {
22    /**
23     * Sets the port on which rmiregistry listens for incoming connections.
24     * Can be called only if this service is not {@link #isRunning() running}.
25     *
26     * @see #getPort
27     */

28    public void setPort(int port);
29
30    /**
31     * Returns the port on which rmiregistry listens for incoming connections
32     *
33     * @see #setPort
34     */

35    public int getPort();
36
37    /**
38     * Returns whether this MBean has been started and not yet stopped.
39     *
40     * @see #start
41     */

42    public boolean isRunning();
43
44    /**
45     * Starts this MBean: rmiregistry can now accept incoming calls
46     *
47     * @see #stop
48     * @see #isRunning
49     */

50    public void start() throws RemoteException JavaDoc;
51
52    /**
53     * Stops this MBean: rmiregistry cannot accept anymore incoming calls
54     *
55     * @see #start
56     */

57    public void stop() throws NoSuchObjectException JavaDoc;
58
59    /**
60     * Returns an array of the names bound in the rmiregistry
61     *
62     * @see java.rmi.registry.Registry#list()
63     */

64    public String JavaDoc[] list() throws RemoteException JavaDoc;
65
66    /**
67     * Removes the binding for the specified <code>name</code> in the rmiregistry
68     *
69     * @see java.rmi.registry.Registry#unbind(String)
70     */

71    public void unbind(String JavaDoc name) throws RemoteException JavaDoc, NotBoundException JavaDoc;
72 }
73
Popular Tags