Asterisk-Java

org.asteriskjava.fastagi.command
Class HangupCommand

java.lang.Object
  extended by org.asteriskjava.fastagi.command.AbstractAgiCommand
      extended by org.asteriskjava.fastagi.command.HangupCommand
All Implemented Interfaces:
java.io.Serializable, AgiCommand

public class HangupCommand
extends AbstractAgiCommand

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

Version:
$Id: HangupCommand.java 938 2007-12-31 03:23:38Z srt $
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 org.asteriskjava.fastagi.command.AbstractAgiCommand
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 interface: AgiCommand
Returns a string suitable to be sent to asterisk.

Specified by:
buildCommand in interface AgiCommand
Specified by:
buildCommand in class AbstractAgiCommand
Returns:
a string suitable to be sent to asterisk.

Asterisk-Java

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