[Asterisk-java-cvs] CVS: asterisk-java/src/java/net/sf/asterisk/manager/action SIPPeersAction.java,1
Brought to you by:
srt
Update of /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10109/src/java/net/sf/asterisk/manager/action Modified Files: SIPPeersAction.java SetVarAction.java StopMonitorAction.java StatusAction.java SIPShowPeerAction.java Log Message: Added convenience constructors to some more manager actions Index: SIPPeersAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/SIPPeersAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- SIPPeersAction.java 18 Jul 2005 14:53:24 -0000 1.1 +++ SIPPeersAction.java 7 Aug 2005 16:55:18 -0000 1.2 @@ -18,11 +18,11 @@ package net.sf.asterisk.manager.action; import net.sf.asterisk.manager.event.PeerlistCompleteEvent; - /** * Retrieves a list of all defined SIP peers.<br> - * For each peer that is found a PeerEntryEvent is sent by Asterisk containing - * the details. When all peers have been reported a PeerlistCompleteEvent is sent.<br> + * For each peer that is found a PeerEntryEvent is sent by Asterisk containing + * the details. When all peers have been reported a PeerlistCompleteEvent is + * sent.<br> * Available since Asterisk 1.2 * * @see net.sf.asterisk.manager.event.PeerEntryEvent @@ -31,13 +31,23 @@ import net.sf.asterisk.manager.event.Pee * @version $Id$ * @since 0.2 */ -public class SIPPeersAction extends AbstractManagerAction implements EventGeneratingAction +public class SIPPeersAction extends AbstractManagerAction + implements + EventGeneratingAction { /** * Serial version identifier */ private static final long serialVersionUID = 921037572305993779L; + /** + * Creates a new SIPPeersAction. + */ + public SIPPeersAction() + { + + } + public String getAction() { return "SIPPeers"; Index: SetVarAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/SetVarAction.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -p -r1.2 -r1.3 --- SetVarAction.java 16 Jul 2005 13:19:34 -0000 1.2 +++ SetVarAction.java 7 Aug 2005 16:55:18 -0000 1.3 @@ -17,7 +17,7 @@ package net.sf.asterisk.manager.action; /** - * The SetVar action will set the value of a variable for a given channel. + * The SetVar action sets the value of a channel variable for a given channel. * * @author Asteria Solutions Group, Inc. <http://www.asteriasgi.com> * @version $Id$ @@ -45,6 +45,30 @@ public class SetVarAction extends Abstra public String value; /** + * Creates a new empty SetVarAction. + */ + public SetVarAction() + { + + } + + /** + * Creates a new SetVarAction that sets the given channel variable of the + * given channel to a new value. + * + * @param channel the name of the channel to set the variable on + * @param variable the name of the channel variable + * @param value the new value + * @since 0.2 + */ + public SetVarAction(String channel, String variable, String value) + { + this.channel = channel; + this.variable = variable; + this.value = value; + } + + /** * Returns the name of this action, i.e. "SetVar". * * @return the name of this action Index: StopMonitorAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/StopMonitorAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -p -r1.4 -r1.5 --- StopMonitorAction.java 16 Jul 2005 13:19:33 -0000 1.4 +++ StopMonitorAction.java 7 Aug 2005 16:55:18 -0000 1.5 @@ -36,6 +36,26 @@ public class StopMonitorAction extends A private String channel; /** + * Creates a new empty StopMonitorAction. + */ + public StopMonitorAction() + { + + } + + /** + * Creates a new StopMonitorAction that ends monitoring of the given + * channel. + * + * @param channel the name of the channel to stop monitoring. + * @since 0.2 + */ + public StopMonitorAction(String channel) + { + + } + + /** * Returns the name of this action, i.e. "StopMonitor". * * @return the name of this action. Index: StatusAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/StatusAction.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -p -r1.4 -r1.5 --- StatusAction.java 16 Jul 2005 14:25:48 -0000 1.4 +++ StatusAction.java 7 Aug 2005 16:55:18 -0000 1.5 @@ -20,16 +20,17 @@ import net.sf.asterisk.manager.event.Sta /** * The StatusAction requests the state of all active channels.<br> - * For each active channel a StatusEvent is generated. After the state of all channels has been - * reported a StatusCompleteEvent is generated. + * For each active channel a StatusEvent is generated. After the state of all + * channels has been reported a StatusCompleteEvent is generated. * * @see net.sf.asterisk.manager.event.StatusEvent * @see net.sf.asterisk.manager.event.StatusCompleteEvent - * * @author srt * @version $Id$ */ -public class StatusAction extends AbstractManagerAction implements EventGeneratingAction +public class StatusAction extends AbstractManagerAction + implements + EventGeneratingAction { /** * Serializable version identifier @@ -37,6 +38,14 @@ public class StatusAction extends Abstra static final long serialVersionUID = -320228893513973367L; /** + * Creates a new StatusAction. + */ + public StatusAction() + { + + } + + /** * Returns the name of this action, i.e. "Status". */ public String getAction() Index: SIPShowPeerAction.java =================================================================== RCS file: /cvsroot/asterisk-java/asterisk-java/src/java/net/sf/asterisk/manager/action/SIPShowPeerAction.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -p -r1.1 -r1.2 --- SIPShowPeerAction.java 18 Jul 2005 14:53:25 -0000 1.1 +++ SIPShowPeerAction.java 7 Aug 2005 16:55:18 -0000 1.2 @@ -20,8 +20,8 @@ import net.sf.asterisk.manager.event.Pee /** * Retrieves a the details about a given SIP peer.<br> - * For a PeerEntryEvent is sent by Asterisk containing the details of the peer followed by a - * PeerlistCompleteEvent.<br> + * For a PeerEntryEvent is sent by Asterisk containing the details of the peer + * followed by a PeerlistCompleteEvent.<br> * Available since Asterisk 1.2 * * @see net.sf.asterisk.manager.event.PeerEntryEvent @@ -30,7 +30,9 @@ import net.sf.asterisk.manager.event.Pee * @version $Id$ * @since 0.2 */ -public class SIPShowPeerAction extends AbstractManagerAction implements EventGeneratingAction +public class SIPShowPeerAction extends AbstractManagerAction + implements + EventGeneratingAction { /** * Serial version identifier @@ -38,6 +40,26 @@ public class SIPShowPeerAction extends A private static final long serialVersionUID = 921037572305993779L; private String peer; + /** + * Creates a new empty SIPShowPeerAction. + */ + public SIPShowPeerAction() + { + + } + + /** + * Creates a new SIPShowPeerAction that requests the details about the given + * SIP peer. + * + * @param peer the name of the SIP peer to retrieve details for. + * @since 0.2 + */ + public SIPShowPeerAction(String peer) + { + this.peer = peer; + } + public String getAction() { return "SIPPeer"; |