org.objectweb.dream.channel
Interface SocketManager

All Known Implementing Classes:
SocketManagerIPChunkBasedImpl, SocketManagerIPStaticImpl

public interface SocketManager

Interface used by ChannelOut to retreive a socket to send a message to a ChannelIn.


Field Summary
static String ITF_NAME
          The default name of interface of this type.
 
Method Summary
 SocketState getSocket(Message message)
          Returns a socket that can be used to send message to a ChannelIn
 void releaseSocket(SocketState socketState, boolean error)
          Releases the given SocketState.
 

Field Detail

ITF_NAME

public static final String ITF_NAME
The default name of interface of this type.

See Also:
Constant Field Values
Method Detail

getSocket

public SocketState getSocket(Message message)
                      throws IOException,
                             InterruptedException
Returns a socket that can be used to send message to a ChannelIn

Parameters:
message - a message that is going to be sent to a ChannelIn
Returns:
a connection to the ChannelIn.
Throws:
IOException - if the socket can't be opened.
InterruptedException - if the component is interrupted while waiting.

releaseSocket

public void releaseSocket(SocketState socketState,
                          boolean error)
Releases the given SocketState.

Parameters:
socketState - the socket state to release.
error - true if an exception has been catched while sending the message, false otherwise.


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.