View Javadoc

1   /*
2    *  Copyright 2004-2006 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 org.asteriskjava.manager;
18  
19  import java.util.Collection;
20  
21  import org.asteriskjava.manager.event.ResponseEvent;
22  import org.asteriskjava.manager.response.ManagerResponse;
23  
24  
25  /***
26   * Contains the result of executing an 
27   * {@link org.asteriskjava.manager.action.EventGeneratingAction}, that is the
28   * {@link org.asteriskjava.manager.response.ManagerResponse} and any received 
29   * {@link org.asteriskjava.manager.event.ManagerEvent}s.
30   * 
31   * @see org.asteriskjava.manager.action.EventGeneratingAction
32   * @author srt
33   * @version $Id: ResponseEvents.java 382 2006-05-25 12:48:38Z srt $
34   * @since 0.2
35   */
36  public interface ResponseEvents
37  {
38      /***
39       * Returns the response received.
40       * 
41       * @return the response received.
42       */
43      ManagerResponse getResponse();
44  
45      /***
46       * Returns a Collection of ManagerEvents that have been received including
47       * the last one that indicates completion.
48       * 
49       * @return a Collection of ManagerEvents received.
50       */
51      Collection<ResponseEvent> getEvents();
52  }