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 MailboxStatusResponse is sent in response to a MailboxStatusAction and indicates if a set
21   * of mailboxes contains waiting messages.
22   * 
23   * @see net.sf.asterisk.manager.action.MailboxStatusAction
24   * 
25   * @author srt
26   * @version $Id: MailboxStatusResponse.java,v 1.3 2005/03/01 19:27:00 srt Exp $
27   */
28  public class MailboxStatusResponse extends ManagerResponse
29  {
30      /***
31       * Serial version identifier
32       */
33      private static final long serialVersionUID = -7193581424292429279L;
34      
35      /***
36       * The name of the mailbox.
37       */
38      private String mailbox;
39      
40      /***
41       * Indicates if there are new messages waiting in the given set of mailboxes.
42       */
43      private Boolean waiting;
44  
45      /***
46       * Returns the names of the mailboxes, separated by ",".
47       * @return the names of the mailbox.
48       */
49      public String getMailbox()
50      {
51          return mailbox;
52      }
53  
54      /***
55       * Sets the names of the mailboxes.
56       * @param mailbox the names of the mailboxes.
57       */
58      public void setMailbox(String mailbox)
59      {
60          this.mailbox = mailbox;
61      }
62  
63      /***
64       * Returns Boolean.TRUE if at least one of the given mailboxes contains new messages;
65       * Boolean.FALSE otherwise.
66       */
67      public Boolean getWaiting()
68      {
69          return waiting;
70      }
71  
72      /***
73       * Set to Boolean.TRUE if at least one of the mailboxes contains new messages;
74       * Boolean.FALSE otherwise.
75       */
76      public void setWaiting(Boolean waiting)
77      {
78          this.waiting = waiting;
79      }
80  }