KickJava   Java API By Example, From Geeks To Geeks.

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


1 package com.ubermq.jms.server.admin;
2
3 import java.rmi.*;
4 import java.rmi.server.*;
5 import java.util.*;
6
7 /**
8  * Creates a remote administrative proxy for
9  * a persistent consumer administration interface that
10  * delegates incoming remote requests to a local
11  * implementation of the <code>DurableSubscriptionAdmin</code>
12  * interface.<P>
13  *
14  * This proxy can represent queues or durable subscribers.<P>
15  */

16 public class RemotePersistentConsumerAdminProxy
17     extends UnicastRemoteObject
18     implements PersistentConsumerAdmin
19 {
20     private PersistentConsumerAdmin delegate;
21
22     public RemotePersistentConsumerAdminProxy(PersistentConsumerAdmin a)
23         throws RemoteException
24     {
25         super();
26         this.delegate = a;
27     }
28
29     public boolean equals(Object JavaDoc o)
30     {
31         return delegate.equals(o);
32     }
33
34     /**
35      * Deletes the subscription from the server. This operation
36      * removes all storage associated with the subscription and any
37      * enqueued messages.
38      *
39      * @throws JMSException if the subscription is being used.
40      */

41     public void close() throws javax.jms.JMSException JavaDoc, RemoteException
42     {
43         delegate.close();
44     }
45
46     /**
47      * Returns true if the subscriber is representing
48      * a queue.<P>
49      */

50     public boolean isQueue() throws RemoteException
51     {
52         return delegate.isQueue();
53     }
54
55     /**
56      * Describes the set of topics that the subscriber is
57      * subscribed to.<P>
58      *
59      * @return a topic or queue specifier
60      */

61     public String JavaDoc getSubscription() throws RemoteException
62     {
63         return delegate.getSubscription();
64     }
65
66     /**
67      * Describes the durable subscriber. This should generally
68      * be the human-readable name of the subscriber or queue.<P>
69      *
70      * @return a name describing the connection
71      */

72     public String JavaDoc getName() throws RemoteException
73     {
74         return delegate.getName();
75     }
76
77     /**
78      * Indicates whether a consumer is connected to this subscription.<P>
79      *
80      * @return true if at least one consumer is connected to this subscription.
81      */

82     public boolean isActive() throws RemoteException
83     {
84         return delegate.isActive();
85     }
86
87     /**
88      * Describes the persistent consumer in a human-readable
89      * way. This should contain information about connected
90      * subscribers, or active/inactive status.<p>
91      *
92      * @return an HTML formatted String describing
93      * the consumer's state.
94      */

95     public String JavaDoc getDescription() throws RemoteException
96     {
97         return delegate.getDescription();
98     }
99
100
101 }
102
Popular Tags