Asterisk-Java

org.asteriskjava.manager.internal
Interface ManagerReader

All Superinterfaces:
java.lang.Runnable
All Known Implementing Classes:
ManagerReaderImpl

public interface ManagerReader
extends java.lang.Runnable

The ManagerReader reads events and responses from the asterisk server, parses them using EventBuilderImpl and ResponseBuilder and dispatches them to the associated ManagerConnection.

Do not use this interface in your code, it is intended to be used only by the DefaultManagerConnection.

Version:
$Id: ManagerReader.java 527 2006-08-08 01:48:16Z srt $
Author:
srt
See Also:
EventBuilder, ResponseBuilder, DefaultManagerConnection

Method Summary
 void die()
           
 java.io.IOException getTerminationException()
          Returns the Exception that caused this reader to terminate if any.
 boolean isDead()
           
 void registerEventClass(java.lang.Class event)
          Registers a new event type with the underlying EventBuilderImpl.
 void setSocket(SocketConnectionFacade socket)
          Sets the socket to use for reading from the asterisk server.
 
Methods inherited from interface java.lang.Runnable
run
 

Method Detail

setSocket

void setSocket(SocketConnectionFacade socket)
Sets the socket to use for reading from the asterisk server.

Parameters:
socket - the socket to use for reading from the asterisk server.

registerEventClass

void registerEventClass(java.lang.Class event)
Registers a new event type with the underlying EventBuilderImpl.

The eventClass must extend ManagerEvent.

Parameters:
event - class of the event to register.
See Also:
EventBuilder, ManagerEvent

die

void die()

isDead

boolean isDead()

getTerminationException

java.io.IOException getTerminationException()
Returns the Exception that caused this reader to terminate if any.

Returns:
the Exception that caused this reader to terminate if any or null if not.

Asterisk-Java

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