001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.mq.server.jmx;
023:
024: import javax.management.ObjectName;
025: import org.jboss.system.ServiceMBean;
026: import org.jboss.mq.MessageStatistics;
027: import org.jboss.mq.server.MessageCounter;
028:
029: /**
030: * MBean interface for destination managers.
031: *
032: *
033: * @author <a href="pra@tim.se">Peter Antman</a>
034: * @version $Revision: 57198 $
035: */
036: public interface DestinationMBean extends ServiceMBean {
037: /**
038: * Get the value of JBossMQService.
039: * @return value of JBossMQService.
040: */
041: void removeAllMessages() throws Exception;
042:
043: /**
044: * Get the value of JBossMQService.
045: * @return value of JBossMQService.
046: */
047: ObjectName getDestinationManager();
048:
049: /**
050: * Set the value of JBossMQService.
051: * @param v Value to assign to JBossMQService.
052: */
053: void setDestinationManager(ObjectName jbossMQService);
054:
055: /**
056: * Sets the JNDI name for this destination
057: * @param name Name to bind this topic to in the JNDI tree
058: */
059: void setJNDIName(String name) throws Exception;
060:
061: /**
062: * Gets the JNDI name use by this destination.
063: * @return The JNDI name currently in use
064: */
065: String getJNDIName();
066:
067: /**
068: * Sets the security xml config
069: */
070: //void setSecurityConf(String securityConf) throws Exception;
071: void setSecurityConf(org.w3c.dom.Element securityConf)
072: throws Exception;
073:
074: /**
075: * Set the object name of the security manager.
076: */
077: public void setSecurityManager(ObjectName securityManager);
078:
079: /**
080: * get message counter of all internal queues
081: */
082: public MessageCounter[] getMessageCounter();
083:
084: /**
085: * get message statistics of all internal queues
086: */
087: public MessageStatistics[] getMessageStatistics() throws Exception;
088:
089: /**
090: * List destination message counter
091: * @return String
092: */
093: public String listMessageCounter();
094:
095: /**
096: * Reset destination message counter
097: */
098: public void resetMessageCounter();
099:
100: /**
101: * List destination message counter history
102: * @return String
103: */
104: public String listMessageCounterHistory();
105:
106: /**
107: * Reset destination message counter history
108: */
109: public void resetMessageCounterHistory();
110:
111: /**
112: * Sets the destination message counter history day limit
113: * <0: unlimited, =0: disabled, > 0 maximum day count
114: *
115: * @param days maximum day count
116: */
117: public void setMessageCounterHistoryDayLimit(int days);
118:
119: /**
120: * Gets the destination message counter history day limit
121: * @return Maximum day count
122: */
123: public int getMessageCounterHistoryDayLimit();
124:
125: /**
126: * Retrieve the maximum depth of the queue or individual
127: * subscriptions
128: * @return the maximum depth
129: */
130: public int getMaxDepth();
131:
132: /**
133: * Set the maximum depth of the queue or individual subscriptions
134: * @param depth the maximum depth, zero means unlimited
135: */
136: public void setMaxDepth(int depth);
137:
138: /**
139: * Retrieve the topic/queue in memory mode
140: * @return true for in memory
141: */
142: public boolean getInMemory();
143:
144: /**
145: * Set the temporary topic/queue in memory mode
146: * @parameters true for in memory
147: */
148: public void setInMemory(boolean mode);
149:
150: /**
151: * Returns the message redelivery limit; the number of redelivery attempts
152: * before a message is moved to the DLQ.
153: */
154: public int getRedeliveryLimit();
155:
156: /**
157: * Sets the redelivery limit.
158: */
159: public void setRedeliveryLimit(int limit);
160:
161: /**
162: * Returns the message redelivery delay, the delay in milliseconds before a
163: * rolled back or recovered message is redelivered
164: */
165: public long getRedeliveryDelay();
166:
167: /**
168: * Sets the Message redelivery delay in milliseconds.
169: */
170: public void setRedeliveryDelay(long rDelay);
171:
172: /**
173: * Returns the implementation class for receivers
174: */
175: public Class getReceiversImpl();
176:
177: /**
178: * Sets the class implementating the receivers
179: */
180: public void setReceiversImpl(Class receivers);
181:
182: /**
183: * Returns the recovery retries
184: */
185: public int getRecoveryRetries();
186:
187: /**
188: * Sets the class implementating the receivers
189: */
190: public void setRecoveryRetries(int retries);
191:
192: /**
193: * Returns the expiry destination.
194: */
195: public ObjectName getExpiryDestination();
196:
197: /**
198: * Sets the expiry destination.
199: */
200: public void setExpiryDestination(ObjectName destination);
201:
202: }
|