JBoss Remoting 3.1.0.Beta1

org.jboss.remoting3.stream
Class ObjectPipe<T>

java.lang.Object
  extended by org.jboss.remoting3.stream.ObjectPipe<T>

public final class ObjectPipe<T>
extends Object

A pipe for objects. Typically, data is written to the sink side of the pipe from one thread while being read from the source side in another thread. Object pipes are useful in the case that you send an ObjectSink to a remote system in a request, but you want to read the objects from an ObjectSource.


Constructor Summary
ObjectPipe(int max)
          Create an object pipe with the given maximum buffer size.
 
Method Summary
 ObjectSink<T> getSink()
          Get the sink end of the pipe, to which objects may be written.
 ObjectSource<T> getSource()
          Get the source end of the pipe, from which objects may be read.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectPipe

public ObjectPipe(int max)
Create an object pipe with the given maximum buffer size.

Parameters:
max - the maximum number of buffered objects
Method Detail

getSource

public ObjectSource<T> getSource()
Get the source end of the pipe, from which objects may be read.

Returns:
the source end

getSink

public ObjectSink<T> getSink()
Get the sink end of the pipe, to which objects may be written.

Returns:
the sink end

JBoss Remoting 3.1.0.Beta1

Copyright © 2010 JBoss, a division of Red Hat, Inc.