|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ILnkSTRRootEndpoint
The Single Threaded Reader Link Root Endpoint interface.
The STR (Single Threaded Reader) root endpoint is a root endpoint that restricts the read machinery of a link tree to be driven by only a single reader thread. It also prescribes mechanisms by which the reader thread is associated with the endpoint's read machinery.
Basically, this interface adds two additional method i.e. the
startRead(com.neeve.emx.IEmxDispatcher, int)
and the stopRead(int)
method. A user uses
the former method to kick off the read machinery i.e. the receipt
of packets from the remote endpoint that is the peer of the root
endpoint. The thread (dispatcher) that will be driving the read
operation is specified in the same method. The latter method is
used to stop the receipt of packets and to disassociate the reader
thread from the endpoint's read machinery.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.neeve.link.ILnkRootEndpoint |
---|
ILnkRootEndpoint.ThreadingModel |
Method Summary | |
---|---|
void |
startRead(IEmxDispatcher dispatcher,
int flags)
Start the receipt of packets through the link tree. |
void |
stopRead(int flags)
Stop the receipt of packets from the remote endpoint. |
Methods inherited from interface com.neeve.link.ILnkRootEndpoint |
---|
getThreadingModel, isReadOperational, registerMessageFactory, scheduleRead |
Method Detail |
---|
void startRead(IEmxDispatcher dispatcher, int flags) throws ELnkInvalidStateException, ELnkNotOwnerException, ELnkOpFailedException
dispatcher
- The dispatcher that is to drive the link tree (aka
the endpoint's) read machinery. Upon return from this method, the caller
will drive this dispatcher that will, in turn, drive the receipt of
packets from the remote endpoint. The calling thread must be the owner
of the specified dispatcher.flags
- Flags used to qualify the read operation. Currently, there
are no flags supported for use here. The user will always specify a
value of 0 in this parameter
ELnkInvalidStateException
- Thrown in case the user is attempting
to start a read on a closed endpoint or a ready has already been started
on this endpoint.
ELnkNotOwnerException
- Thrown in case this method is invoked
by a thread that is not the owner of the specified dispatcher.
ELnkOpFailedException
- Thrown in case an error was encountered
during the starting of the read.
This method should be used to associate a thread (dispatcher) with the endpoints read machinery and to kick off the receipt of packets from the remote endpoint to be dispatched through the link tree of which this endpoint is the root.
void stopRead(int flags) throws ELnkInvalidStateException, ELnkNotOwnerException, ELnkOpFailedException
flags
- Flags used to qualify the read operation. Currently, there
are no flags supported for use here. The user will always specify a
value of 0 in this parameter
ELnkInvalidStateException
- Thrown in case the user is attempting
to stop a read on a closed endpoint or an endpoint on which the read
has not been previously started.
ELnkNotOwnerException
- Thrown in case this method is invoked
by a thread that is not the owner of the specified dispatcher.
ELnkOpFailedException
- Thrown in case an error was encountered
during the stopping of the read.
This method should be used to stop the read on an endpoint. Upon successful return from this method, the read machinery should have been disassociated from the reader thread and no more packets will be dispatched through the root endpoint's link tree.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |