org.codehaus.gpars

groovyx.gpars.dataflow.stream
[Java] Class DataflowStreamWriteAdapter

java.lang.Object
  groovyx.gpars.dataflow.stream.DataflowStreamWriteAdapter
All Implemented Interfaces:
DataflowWriteChannel

@SuppressWarnings({"SynchronizedMethod"})
public class DataflowStreamWriteAdapter
extends java.lang.Object

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.

Parameters:
- The type of messages to pass through the stream
Authors:
Vaclav Pech


Field Summary
private DataflowStream head

 
Constructor Summary
DataflowStreamWriteAdapter(DataflowStream stream)

Creates a new adapter

 
Method Summary
void bind(T value)

protected DataflowStream getHead()

DataflowWriteChannel leftShift(T value)

DataflowWriteChannel leftShift(DataflowReadChannel ref)

java.lang.String toString()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Field Detail

head

private DataflowStream head


 
Constructor Detail

DataflowStreamWriteAdapter

public DataflowStreamWriteAdapter(DataflowStream stream)
Creates a new adapter
Parameters:
stream - The stream to wrap


 
Method Detail

bind

@Override
public final void bind(T value)


getHead

protected final DataflowStream getHead()


leftShift

@Override
public final DataflowWriteChannel leftShift(T value)


leftShift

@Override
public final DataflowWriteChannel leftShift(DataflowReadChannel ref)


toString

@Override
public java.lang.String toString()


 

Copyright © 2008–2010 Václav Pech. All Rights Reserved.