1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package net.sf.asterisk.manager.action;
18
19 import net.sf.asterisk.manager.event.PeerlistCompleteEvent;
20
21 /***
22 * Retrieves a the details about a given SIP peer.<br>
23 * For a PeerEntryEvent is sent by Asterisk containing the details of the peer
24 * followed by a PeerlistCompleteEvent.<br>
25 * Available since Asterisk 1.2
26 *
27 * @see net.sf.asterisk.manager.event.PeerEntryEvent
28 * @see net.sf.asterisk.manager.event.PeerlistCompleteEvent
29 * @author srt
30 * @version $Id: SIPShowPeerAction.java,v 1.3 2005/08/27 10:18:05 srt Exp $
31 * @since 0.2
32 */
33 public class SIPShowPeerAction extends AbstractManagerAction
34 implements
35 EventGeneratingAction
36 {
37 /***
38 * Serial version identifier
39 */
40 private static final long serialVersionUID = 921037572305993779L;
41 private String peer;
42
43 /***
44 * Creates a new empty SIPShowPeerAction.
45 */
46 public SIPShowPeerAction()
47 {
48
49 }
50
51 /***
52 * Creates a new SIPShowPeerAction that requests the details about the given
53 * SIP peer.
54 *
55 * @param peer the name of the SIP peer to retrieve details for.
56 * @since 0.2
57 */
58 public SIPShowPeerAction(String peer)
59 {
60 this.peer = peer;
61 }
62
63 public String getAction()
64 {
65 return "SIPShowPeer";
66 }
67
68 /***
69 * Returns the name of the peer to retrieve.<br>
70 * This parameter is mandatory.
71 *
72 * @return the name of the peer to retrieve.
73 */
74 public String getPeer()
75 {
76 return peer;
77 }
78
79 /***
80 * Sets the name of the peer to retrieve.<br>
81 * This parameter is mandatory.
82 *
83 * @param peer the name of the peer to retrieve.
84 */
85 public void setPeer(String peer)
86 {
87 this.peer = peer;
88 }
89
90 public Class getActionCompleteEventClass()
91 {
92 return PeerlistCompleteEvent.class;
93 }
94 }