com.planet_ink.coffee_mud.core
Class CoffeeIOPipe.CoffeeIOPipes

java.lang.Object
  extended by com.planet_ink.coffee_mud.core.CoffeeIOPipe.CoffeeIOPipes
Enclosing class:
CoffeeIOPipe

public static class CoffeeIOPipe.CoffeeIOPipes
extends java.lang.Object

A pair of coffee pipes, for using to build a pair of coffee pipe sockets.


Constructor Summary
CoffeeIOPipe.CoffeeIOPipes(int bufferSize)
          Creates a pair of coffee pipes
CoffeeIOPipe.CoffeeIOPipes(int bufferSize, java.lang.Runnable writeCallback)
          Creates a pair of coffee pipes
 
Method Summary
 void close()
          Closes all pipes.
 CoffeeIOPipe getLeftPipe()
          Returns the first pipe
 CoffeeIOPipe getRightPipe()
          Returns the second pipe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoffeeIOPipe.CoffeeIOPipes

public CoffeeIOPipe.CoffeeIOPipes(int bufferSize,
                                  java.lang.Runnable writeCallback)
Creates a pair of coffee pipes

Parameters:
bufferSize - The size of the buffers, split two ways between each pipe
writeCallback - the optional callback for when writes occur

CoffeeIOPipe.CoffeeIOPipes

public CoffeeIOPipe.CoffeeIOPipes(int bufferSize)
Creates a pair of coffee pipes

Parameters:
bufferSize - The size of the buffers, split two ways between each pipe
Method Detail

getLeftPipe

public CoffeeIOPipe getLeftPipe()
Returns the first pipe

Returns:
the left pipe

getRightPipe

public CoffeeIOPipe getRightPipe()
Returns the second pipe

Returns:
the right pipe

close

public void close()
Closes all pipes.