|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object groovyx.gpars.dataflow.stream.DataflowStreamWriteAdapter<T>
T
- The type of messages to pass through the streampublic class DataflowStreamWriteAdapter<T>
Adapts a DataflowStream to accommodate for the DataflowWriteChannel interface. It also synchronizes all changes to the underlying stream allowing multiple threads accessing the stream concurrently.
Field Summary | |
---|---|
private DataflowStream<T> |
head
|
Constructor Summary | |
---|---|
DataflowStreamWriteAdapter(DataflowStream<T> stream)
Creates a new adapter |
Method Summary | |
---|---|
void |
bind(T value)
Assigns a value to the variable. |
protected DataflowStream<T> |
getHead()
|
DataflowWriteChannel<T> |
leftShift(DataflowReadChannel<T> ref)
Assigns a value from one DataflowVariable instance to this variable. |
DataflowWriteChannel<T> |
leftShift(T value)
Assigns a value to the variable. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private DataflowStream<T> head
Constructor Detail |
---|
public DataflowStreamWriteAdapter(DataflowStream<T> stream)
stream
- The stream to wrapMethod Detail |
---|
public final DataflowWriteChannel<T> leftShift(T value)
DataflowWriteChannel
leftShift
in interface DataflowWriteChannel<T>
value
- The value to assign
public final DataflowWriteChannel<T> leftShift(DataflowReadChannel<T> ref)
DataflowWriteChannel
leftShift
in interface DataflowWriteChannel<T>
ref
- The DataflowVariable instance the value of which to bind
public final void bind(T value)
DataflowWriteChannel
bind
in interface DataflowWriteChannel<T>
value
- The value to assignpublic java.lang.String toString()
toString
in class java.lang.Object
protected final DataflowStream<T> getHead()
|
Copyright © 2008–2010 Václav Pech. All Rights Reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |