KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > joram > mom > dest > DestinationImplMBean


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2004 - 2005 ScalAgent Distributed Technologies
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18  * USA.
19  *
20  * Initial developer(s): ScalAgent Distributed Technologies
21  * Contributor(s):
22  */

23 package org.objectweb.joram.mom.dest;
24
25 public interface DestinationImplMBean {
26   /**
27    * Returns a string representation of this destination.
28    */

29   String JavaDoc toString();
30
31   /**
32    * Returns the unique identifier of the destination.
33    *
34    * @return the unique identifier of the destination.
35    */

36   String JavaDoc getDestinationId();
37
38   /**
39    * Tests if this destination is free for reading.
40    *
41    * @return true if anyone can receive messages from this destination;
42    * false otherwise.
43    */

44   boolean isFreeReading();
45
46   /**
47    * Sets the <code>FreeReading</code> attribute for this destination.
48    *
49    * @param on if true anyone can receive message from this destination.
50    */

51   void setFreeReading(boolean on);
52
53   /**
54    * Tests if this destination is free for writing.
55    *
56    * @return true if anyone can send messages to this destination;
57    * false otherwise.
58    */

59   boolean isFreeWriting();
60
61   /**
62    * Sets the <code>FreeWriting</code> attribute for this destination.
63    *
64    * @param on if true anyone can send message to this destination.
65    */

66   void setFreeWriting(boolean on);
67
68   /**
69    * Returns a string representation of all rights set on this destination.
70    *
71    * @return the rights set on this destination.
72    */

73   String JavaDoc[] getRights();
74
75   /**
76    * Returns a string representation of rights set on this destination for a
77    * particular user. The user is pointed out by its unique identifier.
78    *
79    * @param userid The user's unique identifier.
80    * @return the rights set on this destination.
81    */

82   String JavaDoc getRight(String JavaDoc userid);
83 // void setRight(String userid, String right);
84

85   /**
86    * Return the unique identifier of DMQ set for this destnation if any.
87    *
88    * @return the unique identifier of DMQ set for this destnation if any;
89    * null otherwise.
90    */

91   String JavaDoc getDMQId();
92
93   /**
94    * Returns this destination creation time as a long.
95    *
96    * @return the destination creation time as UTC milliseconds from the epoch.
97    */

98   long getCreationTimeInMillis();
99
100   /**
101    * Returns this destination creation time through a <code>String</code> of
102    * the form: <code>dow mon dd hh:mm:ss zzz yyyy</code>.
103    *
104    * @return the destination creation time.
105    */

106   String JavaDoc getCreationDate();
107
108   /**
109    * Returns the number of messages received since creation time of this
110    * destination.
111    *
112    * @return the number of messages received since creation time.
113    */

114   long getNbMsgsReceiveSinceCreation();
115
116   /**
117    * Returns the number of messages delivered since creation time of this
118    * destination. It includes messages all delivered messages to a consumer,
119    * already acknowledged or not.
120    *
121    * @return the number of messages delivered since creation time.
122    */

123   long getNbMsgsDeliverSinceCreation();
124
125   /**
126    * Returns the number of erroneous messages forwarded to the DMQ since
127    * creation time of this destination..
128    *
129    * @return the number of erroneous messages forwarded to the DMQ.
130    */

131   long getNbMsgsSendToDMQSinceCreation();
132 }
133
Popular Tags