KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ubermq > jms > server > admin > ConnectionAdmin


1 package com.ubermq.jms.server.admin;
2
3 import java.rmi.*;
4 import java.util.*;
5
6 /**
7  * The administrative interface for a connection to
8  * an UberMQ server.
9  */

10 public interface ConnectionAdmin extends Remote
11 {
12     /**
13      * Describes the connection. For TCP connections, for instance, this should
14      * indicate the foreign host. Other connections may describe
15      * themselves in other ways.
16      * @return a name describing the connection
17      */

18     public String JavaDoc getName()
19         throws RemoteException;
20
21     /**
22      * Determines the current subscriptions registered for this
23      * connection. Each subscription is represented by a
24      * String object.
25      *
26      * @return a Collection of String objects representing
27      * subscriptions.
28      */

29     public Collection getSubscriptions()
30         throws RemoteException;
31
32     /**
33      * Indicates whether the connection is active. A connection
34      * is active unless it has been stopped using the <code>stop</code>
35      * method. Closed connections are not available administratively.
36      *
37      * @return true if the connection is active, false otherwise.
38      */

39     public boolean isActive()
40         throws RemoteException;
41
42     /**
43      * Forcibly closes the connection. This can be useful if the connection
44      * is unresponsive.
45      */

46     public void close()
47         throws RemoteException;
48
49     /**
50      * Stops delivery to the connection. This keeps resources open, and message
51      * delivery can be restarted using the <code>start</code> method.
52      */

53     public void stop()
54         throws RemoteException;
55
56     /**
57      * Resumes delivery of messages to the connection.
58      */

59     public void start()
60         throws RemoteException;
61 }
62
Popular Tags