Muscle Java API: muscle::core::ConduitExit< T extends Serializable > Class Reference

muscle::core::ConduitExit< T extends Serializable > Class Reference

List of all members.


Public Member Functions

 ConduitExit (ConduitExitController< T > control)
boolean ready ()
boolean hasNext ()
receive ()
Observation< T > receiveObservation ()
String toString ()

Detailed Description

A ConduitExit outputs messages that are sent over a conduit. Messages are accessed over the blocking receive() function, which returns only messages of a single type. When no more messages will be sent over the conduit, due to the conduit stopping, hasNext() will return false and receive() will throw an exception. It is not thread-safe, in the sense that only a single thread may call hasNext() and receive().

Author:
Joris Borgdorff

Constructor & Destructor Documentation

muscle::core::ConduitExit< T extends Serializable >::ConduitExit ( ConduitExitController< T >  control  )  [inline]


Member Function Documentation

boolean muscle::core::ConduitExit< T extends Serializable >::ready (  )  [inline]

Whether the next call to hasNext or receive will return without blocking. This is a non-blocking function. If it returns true, that does not guarantee that hasNext returns true.

boolean muscle::core::ConduitExit< T extends Serializable >::hasNext (  )  [inline]

Whether there will be a next piece of data. It is a blocking function, waiting for the next message or a signal that no more messages will come. If the sending end has stopped, the result is false. As long as receive() is not called, subsequent calls to hasNext() return the same result. After hasNext() returns true, the subsequent call to receive() is guaranteed to return a result. Conversely, if hasNext() returns false, the subsequent call to receive() will throw a MUSCLEConduitExhaustedException.

T muscle::core::ConduitExit< T extends Serializable >::receive (  )  [inline]

Receive one piece of data. The call is blocking, meaning that it won't return until data is received. Data returned does not need to be copied.

Exceptions:
MUSCLEConduitExhaustedException if hasNext would produce false.
Returns:
a piece of data

Observation<T> muscle::core::ConduitExit< T extends Serializable >::receiveObservation (  )  [inline]

Receive one observation, containing data, the timestamp it belongs to and the timestamp of the next message. The call is blocking, meaning that it won't return until data is received. Data returned does not need to be copied.

Exceptions:
MUSCLEConduitExhaustedException if hasNext would produce false.
Returns:
a piece of data

String muscle::core::ConduitExit< T extends Serializable >::toString (  )  [inline]


Generated on Thu Oct 18 14:28:29 2012 for Muscle Java API by  doxygen 1.5.6