net.sf.asterisk.manager.action
Class RedirectAction

java.lang.Object
  extended by net.sf.asterisk.manager.action.AbstractManagerAction
      extended by net.sf.asterisk.manager.action.RedirectAction
All Implemented Interfaces:
java.io.Serializable, ManagerAction

public class RedirectAction
extends AbstractManagerAction

Redirects a given channel (and an optional additional channel) to a new extension.

Version:
$Id: RedirectAction.java,v 1.4 2005/08/07 16:43:29 srt Exp $
Author:
srt
See Also:
Serialized Form

Constructor Summary
RedirectAction()
          Creates a new empty RedirectAction.
RedirectAction(java.lang.String channel, java.lang.String context, java.lang.String exten, java.lang.Integer priority)
          Creates a new RedirectAction that redirects the given channel to the given context, extension, priority triple.
RedirectAction(java.lang.String channel, java.lang.String extraChannel, java.lang.String context, java.lang.String exten, java.lang.Integer priority)
          Creates a new RedirectAction that redirects the given channels to the given context, extension, priority triple.
 
Method Summary
 java.lang.String getAction()
          Returns the name of this action, i.e.
 java.lang.String getChannel()
          Returns name of the channel to redirect.
 java.lang.String getContext()
          Returns the destination context.
 java.lang.String getExten()
          Returns the destination extension.
 java.lang.String getExtraChannel()
          Returns the name of the additional channel to redirect.
 java.lang.Integer getPriority()
          Returns the destination priority.
 void setChannel(java.lang.String channel)
          Sets the name of the channel to redirect.
 void setContext(java.lang.String context)
          Sets the destination context.
 void setExten(java.lang.String exten)
          Sets the destination extension.
 void setExtraChannel(java.lang.String extraChannel)
          Sets the name of the additional channel to redirect.
 void setPriority(java.lang.Integer priority)
          Sets the destination priority.
 
Methods inherited from class net.sf.asterisk.manager.action.AbstractManagerAction
getActionId, setActionId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RedirectAction

public RedirectAction()
Creates a new empty RedirectAction.


RedirectAction

public RedirectAction(java.lang.String channel,
                      java.lang.String context,
                      java.lang.String exten,
                      java.lang.Integer priority)
Creates a new RedirectAction that redirects the given channel to the given context, extension, priority triple.

Parameters:
channel - the name of the channel to redirect
context - the destination context
exten - the destination extension
priority - the destination priority
Since:
0.2

RedirectAction

public RedirectAction(java.lang.String channel,
                      java.lang.String extraChannel,
                      java.lang.String context,
                      java.lang.String exten,
                      java.lang.Integer priority)
Creates a new RedirectAction that redirects the given channels to the given context, extension, priority triple.

Parameters:
channel - the name of the first channel to redirect
extraChannel - the name of the second channel to redirect
context - the destination context
exten - the destination extension
priority - the destination priority
Since:
0.2
Method Detail

getAction

public java.lang.String getAction()
Returns the name of this action, i.e. "Redirect".

Specified by:
getAction in interface ManagerAction
Specified by:
getAction in class AbstractManagerAction

getChannel

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

Returns:
the name of the channel to redirect

setChannel

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

Parameters:
channel - the name of the channel to redirect

getExtraChannel

public java.lang.String getExtraChannel()
Returns the name of the additional channel to redirect.

Returns:
the name of the additional channel to redirect

setExtraChannel

public void setExtraChannel(java.lang.String extraChannel)
Sets the name of the additional channel to redirect.

Parameters:
extraChannel - the name of the additional channel to redirect

getContext

public java.lang.String getContext()
Returns the destination context.

Returns:
the destination context

setContext

public void setContext(java.lang.String context)
Sets the destination context.

Parameters:
context - the destination context

getExten

public java.lang.String getExten()
Returns the destination extension.

Returns:
the destination extension

setExten

public void setExten(java.lang.String exten)
Sets the destination extension.

Parameters:
exten - the destination extension

getPriority

public java.lang.Integer getPriority()
Returns the destination priority.

Returns:
the destination priority

setPriority

public void setPriority(java.lang.Integer priority)
Sets the destination priority.

Parameters:
priority - the destination priority


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