|
Asterisk-Java | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.asteriskjava.manager.internal.ManagerReaderImpl
public class ManagerReaderImpl
Default implementation of the ManagerReader interface.
| Constructor Summary | |
|---|---|
ManagerReaderImpl(org.asteriskjava.manager.internal.Dispatcher dispatcher,
java.lang.Object source)
Creates a new ManagerReaderImpl. |
|
| 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 eventClass)
Registers a new event type with the underlying EventBuilderImpl. |
void |
run()
Reads line by line from the asterisk server, sets the protocol identifier (using a generated ProtocolIdentifierReceivedEvent) 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(org.asteriskjava.manager.internal.Dispatcher dispatcher,
java.lang.Object source)
dispatcher - the dispatcher to use for dispatching events and responses.source - the source to use when creating ManagerEvents| Method Detail |
|---|
public void setSocket(SocketConnectionFacade socket)
setSocket in interface ManagerReadersocket - the socket to use for reading from the asterisk server.public void registerEventClass(java.lang.Class eventClass)
ManagerReaderThe eventClass must extend ManagerEvent.
registerEventClass in interface ManagerReadereventClass - class of the event to register.EventBuilder,
ManagerEventpublic void run()
ProtocolIdentifierReceivedEvent) as soon as it is
received and dispatches the received events and responses via the associated dispatcher.
run in interface java.lang.RunnableDispatcher.dispatchEvent(ManagerEvent),
Dispatcher.dispatchResponse(ManagerResponse)public void die()
die in interface ManagerReaderpublic boolean isDead()
isDead in interface ManagerReaderpublic java.io.IOException getTerminationException()
ManagerReader
getTerminationException in interface ManagerReadernull if not.
|
Asterisk-Java | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||