net.officefloor.plugin.socket.server.tcp
Interface ServerTcpConnection

All Known Implementing Classes:
TcpConnectionHandler

public interface ServerTcpConnection

TCP connection to be handled by the OfficeFloor.

Author:
Daniel Sagenschneider

Method Summary
 InputBufferStream getInputBufferStream()
          Obtains the InputBufferStream that provides access to the data sent from the client.
 Object getLock()
          Obtains the lock that may be synchronized on to reduce locking overhead of making multiple calls on this ServerTcpConnection.
 OutputBufferStream getOutputBufferStream()
           Obtains the OutputBufferStream to write data back to the client.
 void waitOnClientData()
           Flags for the ManagedObject to not execute another Task until further data is received from the client.
 

Method Detail

getLock

Object getLock()
Obtains the lock that may be synchronized on to reduce locking overhead of making multiple calls on this ServerTcpConnection. In other words, it allows course grained locking.

Returns:
Lock that governs this ServerTcpConnection.

getInputBufferStream

InputBufferStream getInputBufferStream()
Obtains the InputBufferStream that provides access to the data sent from the client.

Returns:
InputBufferStream.

waitOnClientData

void waitOnClientData()
                      throws IOException

Flags for the ManagedObject to not execute another Task until further data is received from the client.

On calling this the next time a Task is invoked using this ManagedObject, data will be available from the InputBufferStream.

Throws:
IOException - If fails to initiate waiting on client.

getOutputBufferStream

OutputBufferStream getOutputBufferStream()

Obtains the OutputBufferStream to write data back to the client.

Closing the OutputBufferStream will result in closing the Connection.

Returns:
OutputBufferStream.


Copyright © 2005-2011. All Rights Reserved.