Asterisk-Java

org.asteriskjava.manager.action
Interface ManagerAction

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
EventGeneratingAction
All Known Implementing Classes:
AbsoluteTimeoutAction, AbstractManagerAction, AbstractMeetMeMuteAction, AgentCallbackLoginAction, AgentLogoffAction, AgentsAction, AgiAction, AtxferAction, BridgeAction, ChallengeAction, ChangeMonitorAction, CommandAction, CoreSettingsAction, CoreShowChannelsAction, CoreStatusAction, DbDelAction, DbDelTreeAction, DbGetAction, DbPutAction, EventsAction, ExtensionStateAction, GetConfigAction, GetVarAction, HangupAction, IaxPeerListAction, JabberSendAction, ListCommandsAction, LoginAction, LogoffAction, MailboxCountAction, MailboxStatusAction, MeetMeMuteAction, MeetMeUnmuteAction, ModuleCheckAction, ModuleLoadAction, MonitorAction, OriginateAction, ParkAction, ParkedCallsAction, PauseMonitorAction, PingAction, PlayDtmfAction, QueueAddAction, QueueLogAction, QueuePauseAction, QueuePenaltyAction, QueueRemoveAction, QueueResetAction, QueueStatusAction, QueueSummaryAction, RedirectAction, SendTextAction, SetCdrUserFieldAction, SetVarAction, ShowDialplanAction, SipNotifyAction, SipPeersAction, SipShowPeerAction, SipShowRegistryAction, StatusAction, StopMonitorAction, UnpauseMonitorAction, UpdateConfigAction, UserEventAction, VoicemailUsersListAction, ZapDialOffhookAction, ZapDndOffAction, ZapDndOnAction, ZapHangupAction, ZapRestartAction, ZapShowChannelsAction, ZapTransferAction

public interface ManagerAction
extends java.io.Serializable

Interface that all Actions that can be sent to the Asterisk server must impement.

Instances of this class represent a command sent to Asterisk via Manager API, requesting a particular Action be performed. The number of actions available to the client are determined by the modules presently loaded in the Asterisk engine.

There is one conrete subclass of ManagerAction per each supported Asterisk Action.

Version:
$Id: ManagerAction.java 938 2007-12-31 03:23:38Z srt $
Author:
srt

Method Summary
 java.lang.String getAction()
          Returns the name of the action for example "Hangup".
 java.lang.String getActionId()
          Returns the action id.
 void setActionId(java.lang.String actionId)
          Sets the action id.
 

Method Detail

getAction

java.lang.String getAction()
Returns the name of the action for example "Hangup".


getActionId

java.lang.String getActionId()
Returns the action id.

Returns:
the user provied action id.

setActionId

void setActionId(java.lang.String actionId)
Sets the action id.

If the action id is set and sent to the asterisk server any response returned by the Asterisk server will include the same id. This way the action id can be used to track actions and their corresponding responses and response events.

Note that Asterisk-Java uses its own internal action id to match actions with the corresponding responses and events. Though the internal action is never exposed to the application code. So if you want to handle reponses or response events on your own your application must set a unique action id using this method otherwise the action id of the reponse and response event objects passed to your application will be null.

Parameters:
actionId - the user provided action id to set.
See Also:
ManagerResponse.getActionId(), ResponseEvent.getActionId()

Asterisk-Java

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