net.sf.asyncobjects.io
Class BytePipe

java.lang.Object
  extended by net.sf.asyncobjects.AsyncUnicastServer<C>
      extended by net.sf.asyncobjects.io.Pipe<BinaryData,AByteInput,AByteOutput,AByteChannel>
          extended by net.sf.asyncobjects.io.BytePipe
All Implemented Interfaces:
ACloseable, AsyncObject, ExplicitSharing, AByteChannel, AChannel<BinaryData,AByteInput,AByteOutput>

public class BytePipe
extends Pipe<BinaryData,AByteInput,AByteOutput,AByteChannel>
implements AByteChannel

A pipe is pair of output stream and input stream, what is written to output stream, could be later read from input stream. The object supports AByteChannel interface. Note that input supports AInput.pushback(BatchedData) operation.

Author:
const
See Also:
AByteChannel

Nested Class Summary
 class BytePipe.InternalBytePipeInput
          Pipe input
 class BytePipe.InternalBytePipeOutput
          Pipe output
 
Nested classes/interfaces inherited from class net.sf.asyncobjects.io.Pipe
Pipe.InternalPipeInput, Pipe.InternalPipeOutput
 
Constructor Summary
BytePipe(int size)
          make a pipe
 
Method Summary
protected  AByteInput createInput()
           
protected  AByteOutput createOutput()
           
 
Methods inherited from class net.sf.asyncobjects.io.Pipe
close, getInput, getOutput, pushback
 
Methods inherited from class net.sf.asyncobjects.AsyncUnicastServer
dereference, export, isImmediate, myVat, promise
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.asyncobjects.io.AChannel
getInput, getOutput
 
Methods inherited from interface net.sf.asyncobjects.ACloseable
close
 
Methods inherited from interface net.sf.asyncobjects.AsyncObject
dereference, isImmediate
 

Constructor Detail

BytePipe

public BytePipe(int size)
make a pipe

Parameters:
size - buffer size for pipe
Method Detail

createInput

protected AByteInput createInput()
Specified by:
createInput in class Pipe<BinaryData,AByteInput,AByteOutput,AByteChannel>
Returns:
an created input
See Also:
Pipe.createInput()

createOutput

protected AByteOutput createOutput()
Specified by:
createOutput in class Pipe<BinaryData,AByteInput,AByteOutput,AByteChannel>
Returns:
an created output
See Also:
Pipe.createOutput()


Copyright © 2002-2007 Constantine Plotnikov. All Rights Reserved.