net.sf.asterisk.manager
Interface ActionBuilder

All Known Implementing Classes:
ActionBuilderImpl

public interface ActionBuilder

Transforms ManagerActions to Strings suitable to be sent to Asterisk.
The attributes are determined using reflection.

Version:
$Id: ActionBuilder.java,v 1.7 2005/11/08 15:25:18 srt Exp $
Author:
srt

Method Summary
 java.lang.String buildAction(ManagerAction action)
          Builds a String suitable to be sent to Asterisk based on the given action object.
Asterisk actions consist of an unordered set of key value pairs corresponding to the attributes of the ManagerActions.
 java.lang.String buildAction(ManagerAction action, java.lang.String internalActionId)
          Builds a String suitable to be sent to Asterisk based on the given action object.
Asterisk actions consist of an unordered set of key value pairs corresponding to the attributes of the ManagerActions.
 void setTargetVersion(AsteriskVersion targetVersion)
          Sets the version of the Asterisk server to built the action for.
 

Method Detail

setTargetVersion

void setTargetVersion(AsteriskVersion targetVersion)
Sets the version of the Asterisk server to built the action for.

Parameters:
asteriskVersion - the version of the target Asterisk server.
Since:
0.2

buildAction

java.lang.String buildAction(ManagerAction action)
Builds a String suitable to be sent to Asterisk based on the given action object.
Asterisk actions consist of an unordered set of key value pairs corresponding to the attributes of the ManagerActions. Key and value are separated by a colon (":"), key value pairs by a CR/NL ("\r\n"). An action is terminated by an empty line ("\r\n\r\n").

Parameters:
action - the action to transform
Returns:
a String representing the given action in an asterisk compatible format

buildAction

java.lang.String buildAction(ManagerAction action,
                             java.lang.String internalActionId)
Builds a String suitable to be sent to Asterisk based on the given action object.
Asterisk actions consist of an unordered set of key value pairs corresponding to the attributes of the ManagerActions. Key and value are separated by a colon (":"), key value pairs by a CR/NL ("\r\n"). An action is terminated by an empty line ("\r\n\r\n").

Parameters:
action - the action to transform
internalActionId - the internal action id to add
Returns:
a String representing the given action in an asterisk compatible format


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