001: /*
002: * JOnAS: Java(TM) Open Application Server
003: * Copyright (C) 1999 Bull S.A.
004: * Contact: jonas-team@objectweb.org
005: *
006: * This library is free software; you can redistribute it and/or
007: * modify it under the terms of the GNU Lesser General Public
008: * License as published by the Free Software Foundation; either
009: * version 2.1 of the License, or any later version.
010: *
011: * This library is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this library; if not, write to the Free Software
018: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
019: * USA
020: *
021: * --------------------------------------------------------------------------
022: * $Id: JmsServiceImplMBean.java 9829 2006-11-10 09:55:29Z danesa $
023: * --------------------------------------------------------------------------
024: */
025:
026: package org.objectweb.jonas.jms;
027:
028: import java.util.Set;
029:
030: /**
031: * MBean Interface for Jms Service Management
032: * MBean type: Standard
033: * MBean model: Delegate (JmsService)
034: * @author Guillaume Riviere
035: * @author Frederic Maistre
036: * 03.05.27 - Add support for monitoring of JMS destinations
037: * 03.09 - New methods related to connection factories
038: */
039: public interface JmsServiceImplMBean {
040:
041: /**
042: * @return the current number of Jms Connection Factory
043: */
044: public Integer getCurrentNumberOfJmsConnectionFactory();
045:
046: /**
047: * @return the current number of Topic Jms Connection Factory
048: */
049: public Integer getCurrentNumberOfJmsTopicConnectionFactory();
050:
051: /**
052: * @return the current number of Queue Jms Connection Factory
053: */
054: public Integer getCurrentNumberOfJmsQueueConnectionFactory();
055:
056: /**
057: * @return the current number of Topic Jms Destination
058: */
059: public Integer getCurrentNumberOfJmsTopicDestination();
060:
061: /**
062: * @return the current number of Queue Jms Destination
063: */
064: public Integer getCurrentNumberOfJmsQueueDestination();
065:
066: /**
067: * Create a new Jms queue destination
068: * @param String jndi Name
069: */
070: public void createJmsQueueDestination(String jndiName);
071:
072: /**
073: * Create a new Jms topic destination
074: * @param String jndi Name
075: */
076: public void createJmsTopicDestination(String jndiName);
077:
078: /**
079: * Remove a Topic Jms destination
080: * @param String jndi name
081: */
082: public void removeJmsTopicDestination(String jndiName);
083:
084: /**
085: * Remove a Queue Jms destination
086: * @param String jndi name
087: */
088: public void removeJmsQueueDestination(String jndiName);
089:
090: /**
091: * Remove a Jms destination
092: * @param String jndi name
093: */
094: public void removeJmsDestination(String jndiName);
095:
096: /**
097: * return Set of Queue Destinations Names
098: */
099: public Set getAllJmsQueueDestinationNames();
100:
101: /**
102: * return Set of Topic Destination Names
103: */
104: public Set getAllJmsTopicDestinationNames();
105:
106: /**
107: * return Set of Connection Factory Names
108: */
109: public Set getAllJmsConnectionFactoryNames();
110:
111: /**
112: * return Set of Queue Connection Factory Names
113: */
114: public Set getAllJmsQueueConnectionFactoryNames();
115:
116: /**
117: * return Set of Topic Destination Names
118: */
119: public Set getAllJmsTopicConnectionFactoryNames();
120:
121: /**
122: * return String name of default Queue Connection factory
123: */
124: public String getDefaultQueueConnectionFactoryName();
125:
126: /**
127: * return String name of default Topic Connection factory
128: */
129: public String getDefaultTopicConnectionFactoryName();
130:
131: /**
132: * @return String name of default Connection factory
133: */
134: public String getDefaultConnectionFactoryName();
135:
136: /**
137: * MBean method:
138: * save updated configuration
139: */
140: public void saveConfig();
141:
142: // Monitoring methods
143:
144: /**
145: * Get the messaging mode a connection factory belongs to
146: * @param jndiName connection factory name
147: * @return messaging mode
148: */
149: public String getConnectionFactoryMode(String jndiName);
150:
151: /**
152: * Get number of pending messages on a queue
153: * @param jndiName queue name
154: * @return number of pending messages
155: */
156: public Integer getPendingMessages(String jndiName);
157:
158: /**
159: * Get number of pending requests on a queue
160: * @param jndiName queue name
161: * @return number of pending requests
162: */
163: public Integer getPendingRequests(String jndiName);
164:
165: /**
166: * Get number of subscriptions on a topic
167: * @param jndiName topic name
168: * @return number of subscriptions
169: */
170: public Integer getSubscriptions(String jndiName);
171:
172: Boolean isMomLocal();
173:
174: public String getUrl();
175:
176: public String getMom();
177: }
|