org.openorb.orb.net
Class PriorityBoostingSocketStreamDecorationStrategy

java.lang.Object
  extended byorg.openorb.orb.net.PriorityBoostingSocketStreamDecorationStrategy
All Implemented Interfaces:
SocketStreamDecorationStrategy

public final class PriorityBoostingSocketStreamDecorationStrategy
extends java.lang.Object
implements SocketStreamDecorationStrategy

A strategy for boosting the priority of reading threads.

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

Nested Class Summary
static class PriorityBoostingSocketStreamDecorationStrategy.Factory
          Factory for creating instances of PriorityBoostingSocketStreamDecorationStrategy.
 
Constructor Summary
PriorityBoostingSocketStreamDecorationStrategy(int minPriority)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PriorityBoostingSocketStreamDecorationStrategy

public PriorityBoostingSocketStreamDecorationStrategy(int minPriority)
Method Detail

decorate

public java.io.InputStream decorate(java.net.Socket socket,
                                    java.io.InputStream stream)
                             throws java.io.IOException
Creates a decorated InputStream.

Specified by:
decorate in interface SocketStreamDecorationStrategy
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

public java.io.OutputStream decorate(java.net.Socket socket,
                                     java.io.OutputStream stream)
                              throws java.io.IOException
Creates a decorated OutputStream.

Specified by:
decorate in interface SocketStreamDecorationStrategy
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.