net.sf.asterisk.fastagi.command
Class HangupCommand

java.lang.Object
  extended by net.sf.asterisk.fastagi.command.AGICommand
      extended by net.sf.asterisk.fastagi.command.HangupCommand
All Implemented Interfaces:
java.io.Serializable

public class HangupCommand
extends AGICommand

Hangs up the specified channel. If no channel name is given, hangs up the current channel.

Version:
$Id: HangupCommand.java,v 1.2 2005/03/08 16:48:34 srt Exp $
Author:
srt
See Also:
Serialized Form

Constructor Summary
HangupCommand()
          Creates a new HangupCommand that hangs up the current channel.
HangupCommand(java.lang.String channel)
          Creates a new HangupCommand that hangs up the given channel.
 
Method Summary
 java.lang.String buildCommand()
          Returns a string suitable to be sent to asterisk.
 java.lang.String getChannel()
          Returns the name of the channel to hangup.
 void setChannel(java.lang.String channel)
          Sets the name of the channel to hangup.
 
Methods inherited from class net.sf.asterisk.fastagi.command.AGICommand
escapeAndQuote, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HangupCommand

public HangupCommand()
Creates a new HangupCommand that hangs up the current channel.


HangupCommand

public HangupCommand(java.lang.String channel)
Creates a new HangupCommand that hangs up the given channel.

Parameters:
channel - the name of the channel to hangup.
Method Detail

getChannel

public java.lang.String getChannel()
Returns the name of the channel to hangup.

Returns:
the name of the channel to hangup or null for the current channel.

setChannel

public void setChannel(java.lang.String channel)
Sets the name of the channel to hangup.

Parameters:
channel - the name of the channel to hangup or null for the current channel.

buildCommand

public java.lang.String buildCommand()
Description copied from class: AGICommand
Returns a string suitable to be sent to asterisk.

Specified by:
buildCommand in class AGICommand
Returns:
a string suitable to be sent to asterisk.


Copyright © 2004-2005 Stefan Reuter. All Rights Reserved.