001 /*
002 *
003 * Licensed to the Apache Software Foundation (ASF) under one
004 * or more contributor license agreements. See the NOTICE file
005 * distributed with this work for additional information
006 * regarding copyright ownership. The ASF licenses this file
007 * to you under the Apache License, Version 2.0 (the
008 * "License"); you may not use this file except in compliance
009 * with the License. You may obtain a copy of the License at
010 *
011 * http://www.apache.org/licenses/LICENSE-2.0
012 *
013 * Unless required by applicable law or agreed to in writing,
014 * software distributed under the License is distributed on an
015 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
016 * KIND, either express or implied. See the License for the
017 * specific language governing permissions and limitations
018 * under the License.
019 *
020 */
021 package org.apache.qpid.management.domain.handler.impl;
022
023 import java.net.URI;
024 import java.util.Date;
025 import java.util.Map;
026 import java.util.UUID;
027
028 /**
029 * Management interface for Qpid domain object.
030 *
031 * @author Andrea Gazzarini
032 */
033 public interface QpidDomainObjectMBean
034 {
035 /**
036 * A method that is throwing an exception, everytime.
037 *
038 * @throws Exception each time the method is called.
039 */
040 void throwsException() throws Exception;
041
042 /**
043 * Sample echo method that return an empty result object.
044 * That is, an object with only status code / text valorized
045 * (no output parameters).
046 *
047 * @return an empty result object.
048 */
049 InvocationResult voidWithoutArguments();
050
051 /**
052 * Echo method that accepts and returns wrapper types.
053 *
054 * @param aLong a java.lang.Long
055 * @param aBoolean a java.lang.Boolean
056 * @param aDouble a java.lang.Double
057 * @param aFloat a java.lang.Float
058 * @param anInteger a java.lang.Integer
059 * @param aShort a java.lang.Short
060 * @param aString a java.lang.String
061 * @param anURI a java.net.URI
062 * @param aDate a java.util.Date
063 * @return a result object with the same given parameters (as output parameters)
064 */
065 InvocationResult echoWithSimpleTypes(
066 Long aLong,
067 Boolean aBoolean,
068 Double aDouble,
069 Float aFloat,
070 Integer anInteger,
071 Short aShort,
072 String aString,
073 URI anURI,
074 Date aDate);
075
076 /**
077 * Echo method that accepts and returns wrapper type arrays .
078 *
079 * @param longs an array of java.lang.Long
080 * @param booleans an array of java.lang.Boolean
081 * @param doubles an array of java.lang.Double
082 * @param floats an array of java.lang.Float
083 * @param integers an array of java.lang.Integer
084 * @param shorts an array of java.lang.Short
085 * @param strings an array of java.lang.String
086 * @param uris an array of java.net.URI
087 * @param dates an array of java.util.Date
088 * @return a result object with the same input parameters (as output parameters).
089 */
090 InvocationResult echoWithArrays(
091 Long [] longs,
092 Boolean [] booleans,
093 Double [] doubles,
094 Float [] floats,
095 Integer [] integers,
096 Short [] shorts,
097 String [] strings,
098 URI [] uris,
099 Date [] dates);
100
101 /**
102 * Echo method that accepts and returns primitive type arrays.
103 *
104 * @param longs an array of long.
105 * @param booleans an array of boolean.
106 * @param doubles an array of double.
107 * @param floats an array of float.
108 * @param integers an array of int.
109 * @param shorts an array of short.
110 * @return a result object with the same input parameters (as output parameters).
111 */
112 InvocationResult echoWithSimpleTypeArrays(
113 long [] longs,
114 boolean [] booleans,
115 double [] doubles,
116 float [] floats,
117 int [] integers,
118 short [] shorts);
119
120 /**
121 * Echo method that accepts and returns a byte array.
122 *
123 * @param byteArray a byte array
124 * @return a result containing the input byte array (as output parameter)
125 */
126 InvocationResult echoWithByteArray(byte [] byteArray);
127
128 /**
129 * Echo method that accepts and returns an UUID.
130 *
131 * @param uuid a java.util.UUID.
132 * @return a result containing the input UUID (as output parameter)
133 */
134 InvocationResult echoWithUUID(UUID uuid);
135
136 /**
137 * Echo method that accepts and returns a Map.
138 *
139 * @param map a java.util.Map.
140 * @return a result containing the input Map (as output parameter)
141 */
142 InvocationResult echoWithMap(Map<String,Object> map);
143
144 /**
145 * Returns the VHostRef property value.
146 *
147 * @return the VHostRef property value.
148 */
149 UUID getVhostRef();
150
151 /**
152 * Returns the name property value.
153 *
154 * @return the name property value.
155 */
156 String getName();
157
158 /**
159 * Returns the durable property value.
160 *
161 * @return the durable property value.
162 */
163 Boolean getDurable();
164
165 /**
166 * Returns the arguments property value.
167 *
168 * @return the arguments property value.
169 */
170 Map<String, Object> getArguments();
171
172 /**
173 * Returns the msgTotalEnqueues property value.
174 *
175 * @return the msgTotalEnqueues property value.
176 */
177 Long getMsgTotalEnqueues();
178
179 /**
180 * Returns the consumerCount property value.
181 *
182 * @return the consumerCount property value.
183 */
184 Integer getConsumerCount();
185
186 /**
187 * Returns the mgmtPubInterval property value.
188 *
189 * @return the mgmtPubInterval property value.
190 */
191 Short getMgmtPubInterval();
192
193 /**
194 * Sets the mgmtPubInterval property value.
195 *
196 * @param the mgmtPubInterval property value.
197 */
198 void setMgmtPubInterval(Short mgmtPubInterval);
199
200 /**
201 * Returns the expireTime property value.
202 *
203 * @return the expireTime property value.
204 */
205 Date getExpireTime();
206
207 /**
208 * Sets the expireTime property value.
209 *
210 * @return the expireTime property value.
211 */
212 void setExpireTime(Date expireTime);
213
214 /**
215 * Returns the type property value.
216 *
217 * @return the type property value.
218 */
219 void setType(String type);
220
221 /**
222 * Sets the type property value.
223 *
224 * @return the type property value.
225 */
226 String getType();
227
228 // /**
229 // * Returns the byteArray property value.
230 // *
231 // * @return the byteArray property value.
232 // */
233 // byte[] getByteArray();
234 }
|