|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.asterisk.manager.impl.ManagerReaderImpl
public class ManagerReaderImpl
Default implementation of the ManagerReader interface.
Constructor Summary | |
---|---|
ManagerReaderImpl(Dispatcher dispatcher,
AsteriskServer asteriskServer)
Creates a new ManagerReaderImpl. |
Method Summary | |
---|---|
void |
die()
|
void |
registerEventClass(java.lang.Class eventClass)
Registers a new event type with the underlying EventBuilderImpl. The eventClass must extend ManagerEvent. |
void |
run()
Reads line by line from the asterisk server, sets the protocol identifier as soon as it is received and dispatches the received events and responses via the associated dispatcher. |
void |
setSocket(SocketConnectionFacade socket)
Sets the socket to use for reading from the asterisk server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ManagerReaderImpl(Dispatcher dispatcher, AsteriskServer asteriskServer)
dispatcher
- the dispatcher to use for dispatching events and responses.Method Detail |
---|
public void setSocket(SocketConnectionFacade socket)
setSocket
in interface ManagerReader
socket
- the socket to use for reading from the asterisk server.public void registerEventClass(java.lang.Class eventClass)
ManagerReader
registerEventClass
in interface ManagerReader
eventClass
- class of the event to register.EventBuilder
,
ManagerEvent
public void run()
run
in interface java.lang.Runnable
DefaultManagerConnection#dispatchEvent(ManagerEvent)
,
DefaultManagerConnection#dispatchResponse(ManagerResponse)
,
DefaultManagerConnection#setProtocolIdentifier(String)
public void die()
die
in interface ManagerReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |