KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > joram > shared > admin > SetNbMaxMsg


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2005 - 2006 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): Nicolas Tachker (Scalagent)
21  * Contributor(s): ScalAgent Distributed Technologies
22  */

23 package org.objectweb.joram.shared.admin;
24
25 /**
26  * A <code>SetNbMaxMsg</code> instance requests to set a
27  * number max of message in Queue or Subscription.
28  */

29 public class SetNbMaxMsg extends AdminRequest {
30   private static final long serialVersionUID = -2173959770467329047L;
31
32   /** Identifier of the queue or subscription. */
33   private String JavaDoc id;
34   /** nbMaxMsg value (-1 no limit).*/
35   private int nbMaxMsg;
36   /** subscription name */
37   private String JavaDoc subName = null;
38
39   /**
40    * Constructs a <code>SetNbMaxMsg</code> instance.
41    *
42    * @param id Identifier of the queue or subscription.
43    * @param nbMaxMsg nb Max of Message (-1 no limit).
44    */

45   public SetNbMaxMsg(String JavaDoc id, int nbMaxMsg) {
46     this.id = id;
47     this.nbMaxMsg = nbMaxMsg;
48   }
49
50   /**
51    * Constructs a <code>SetNbMaxMsg</code> instance.
52    *
53    * @param id Identifier of the queue or subscription.
54    * @param nbMaxMsg nb Max of Message (-1 no limit).
55    * @param subName Subscription name.
56    */

57   public SetNbMaxMsg(String JavaDoc id,
58                      int nbMaxMsg,
59                      String JavaDoc subName) {
60     this.id = id;
61     this.nbMaxMsg = nbMaxMsg;
62     this.subName = subName;
63   }
64   
65   /** Returns the identifier of the queue or subscription. */
66   public String JavaDoc getId() {
67     return id;
68   }
69
70   /** Returns the nbMaxMsg value. */
71   public int getNbMaxMsg() {
72     return nbMaxMsg;
73   }
74
75   /** Returns SubName */
76   public String JavaDoc getSubName() {
77     return subName;
78   }
79 }
80
Popular Tags