View Javadoc

1   /*
2    * Copyright  2004-2005 Stefan Reuter
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   *
16   */
17  package net.sf.asterisk.manager.response;
18  
19  /***
20   * A MailboxCountResponse is sent in response to a MailboxCountAction and contains the number of old
21   * and new messages in a mailbox.
22   * 
23   * @see net.sf.asterisk.manager.action.MailboxCountAction
24   * 
25   * @author srt
26   * @version $Id: MailboxCountResponse.java,v 1.2 2005/02/23 22:50:58 srt Exp $
27   */
28  public class MailboxCountResponse extends ManagerResponse
29  {
30      /***
31       * Serial version identifier
32       */
33      private static final long serialVersionUID = 7820598941277275838L;
34      private String mailbox;
35      private Integer newMessages;
36      private Integer oldMessages;
37  
38      /***
39       * Returns the name of the mailbox.
40       */
41      public String getMailbox()
42      {
43          return mailbox;
44      }
45  
46      /***
47       * Sets the name of the mailbox.
48       */
49      public void setMailbox(String mailbox)
50      {
51          this.mailbox = mailbox;
52      }
53  
54      /***
55       * Returns the number of new messages in the mailbox.
56       */
57      public Integer getNewMessages()
58      {
59          return newMessages;
60      }
61  
62      /***
63       * Sets the number of new messages in the mailbox.
64       */
65      public void setNewMessages(Integer newMessages)
66      {
67          this.newMessages = newMessages;
68      }
69  
70      /***
71       * Returns the number of old messages in the mailbox.
72       */
73      public Integer getOldMessages()
74      {
75          return oldMessages;
76      }
77  
78      /***
79       * Sets the number of old messages in the mailbox.
80       */
81      public void setOldMessages(Integer oldMessages)
82      {
83          this.oldMessages = oldMessages;
84      }
85  }