org.openorb.orb.net
Interface SocketStreamDecorationStrategy

All Known Implementing Classes:
AbstractSocketStreamDecorationStrategy, BufferingSocketStreamDecorationStrategy, CompositeSocketStreamDecorationStrategy, LegacySocketStreamDecorationStrategy, NullSocketStreamDecorationStrategy, PriorityBoostingSocketStreamDecorationStrategy

public interface SocketStreamDecorationStrategy

A strategy for decorating sockets streams.

Version:
$Revision: 1.1 $ $Date: 2004/05/14 00:36:25 $
Author:
Richard G Clark

Nested Class Summary
static interface SocketStreamDecorationStrategy.Factory
          Factory interface for creating instances of SocketStreamDecorationStrategy.
 
Method Summary
 java.io.InputStream decorate(java.net.Socket socket, java.io.InputStream stream)
          Creates a decorated InputStream.
 java.io.OutputStream decorate(java.net.Socket socket, java.io.OutputStream stream)
          Creates a decorated OutputStream.
 

Method Detail

decorate

java.io.InputStream decorate(java.net.Socket socket,
                             java.io.InputStream stream)
                             throws java.io.IOException
Creates a decorated InputStream. Note that the implementation which throws an exception must also close the original stream.

Parameters:
socket - the source of the original stream
stream - the stream to be decorated
Returns:
a decorated InputStream.
Throws:
java.io.IOException - if an I/O error occurs while creating the socket.

decorate

java.io.OutputStream decorate(java.net.Socket socket,
                              java.io.OutputStream stream)
                              throws java.io.IOException
Creates a decorated OutputStream. Note that the implementation which throws an exception must also close the original stream.

Parameters:
socket - the source of the original stream
stream - the stream to be decorated
Returns:
a decorated OutputStream.
Throws:
java.io.IOException - if an I/O error occurs while creating the socket.