net.sf.asterisk.manager
Interface ManagerWriter

All Known Implementing Classes:
ManagerWriterImpl

public interface ManagerWriter

The ManagerWriter transforms actions using an ActionBuilder and sends them to the asterisk server.
This class is intended to be used only by the DefaultManagerConnection.

Version:
$Id: ManagerWriter.java,v 1.6 2005/11/08 15:25:18 srt Exp $
Author:
srt
See Also:
ActionBuilder, DefaultManagerConnection

Method Summary
 void sendAction(ManagerAction action, java.lang.String internalActionId)
          Sends the given action to the asterisk server.
 void setSocket(SocketConnectionFacade socket)
          Sets the socket to use for writing to Asterisk.
 void setTargetVersion(AsteriskVersion targetVersion)
          Sets the version of the target Asterisk server.
 

Method Detail

setTargetVersion

void setTargetVersion(AsteriskVersion targetVersion)
Sets the version of the target Asterisk server.

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

setSocket

void setSocket(SocketConnectionFacade socket)
Sets the socket to use for writing to Asterisk.

Parameters:
socket - the socket to use for writing to Asterisk.

sendAction

void sendAction(ManagerAction action,
                java.lang.String internalActionId)
                throws java.io.IOException
Sends the given action to the asterisk server.

Parameters:
action - the action to send to the asterisk server.
internalActionId - the internal action id to add.
Throws:
java.io.IOException - if there is a problem sending the action.


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