|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.root.RootObject
com.neeve.link.LnkObject
com.neeve.link.LnkContainer
com.neeve.link.LnkSTRContainer
com.neeve.link.LnkSTRRunnableContainer
public class LnkSTRRunnableContainer
A runnable LnkSTRContainer
.
This class extends LnkSTRContainer
by providing a mechanism by
which the reader thread associated with the container is run. The mechanism
is defined by ILnkRunnableContainer
which this class implements.
Field Summary |
---|
Fields inherited from class com.neeve.link.LnkContainer |
---|
RMFLG_ALLOW_READ_OPERATIONAL |
Method Summary | |
---|---|
Object |
run(IEmxDispatcher reader,
int timeout,
ILnkContainerRunCompletionChecker completionChecker)
Drive the container's reader. |
Object |
run(int timeout,
ILnkContainerRunCompletionChecker completionChecker)
Drive the container's reader. |
Methods inherited from class com.neeve.link.LnkSTRContainer |
---|
createTemporary, getCurrentReader, getReader, isCompatible, startRead, stopRead, toString |
Methods inherited from class com.neeve.link.LnkContainer |
---|
getCount, getLink, getLinks, getName, touch, touch |
Methods inherited from class com.neeve.root.RootObject |
---|
getChecked, getThreaded, getTracer, setChecked, setTracer |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public final Object run(IEmxDispatcher reader, int timeout, ILnkContainerRunCompletionChecker completionChecker) throws ELnkOpTimeoutException, ELnkException
This method runs the container reader's event dispatch loop (by invoking
(IEmxDispatcher.run(int)
) for a maximum of the specified timeout or
until the user explictly terminates the run via the completion checker.
run
in interface ILnkRunnableContainer
reader
- The container reader to drive.completionChecker
- The completion checker object that this method
will consult to determine whether to return or not.
This method drives the read machinery of all the link trees that have
been associated with this container using LnkContainer.startRead(com.neeve.link.ILnkPeerEndpoint)
using one of the container's readers. The method is passed a timeout and
a completion checker object. The method will return when either the
timeout expires or the completion checker indicates that the run should
terminate.
ELnkOpTimeoutException
- Thrown if the timeout occurred before
the completion checker indicated completion.
ELnkException
- Thrown in case an error occurs during the running
of the thread.public final Object run(int timeout, ILnkContainerRunCompletionChecker completionChecker) throws ELnkOpTimeoutException, ELnkException
This method runs the container reader's event dispatch loop (by invoking
(IEmxDispatcher.run(int)
) for a maximum of the specified timeout or
until the user explictly terminates the run via the completion checker.
run
in interface ILnkRunnableContainer
timeout
- The maximum timeout (in milliseconds) to drive the link
trees. A value of -1 indicates infinite timeout.completionChecker
- The completion checker object that this method
will consult to determine whether to return or not. This parameter
can be null in which case the method will return only on timeout or
error.
This method drives the read machinery of all the link trees that have
been associated with this container using LnkContainer.startRead(com.neeve.link.ILnkPeerEndpoint)
concurrently using all the container's readers. The method is passed a
timeout and a completion checker object. The method will return when
either the timeout expires or the completion checker indicates that it
should.
ELnkOpTimeoutException
- Thrown if the timeout occurred before
the completion checker indicated completion.
ELnkException
- Thrown in case an error occurs during the running
of the threads.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |