org.objectweb.dream.channel
Class MultiConnTCPChannelOutImpl

java.lang.Object
  extended byorg.objectweb.dream.AbstractComponent
      extended byorg.objectweb.dream.channel.AbstractTCPChannelOutImpl
          extended byorg.objectweb.dream.channel.MultiConnTCPChannelOutImpl
All Implemented Interfaces:
AttributeController, BindingController, ChannelOutAttributeController, LifeCycleController, Loggable, MultiConnTCPChannelOutAttributeController, MultiDestinationChannelOutAttributeController, Push

public class MultiConnTCPChannelOutImpl
extends AbstractTCPChannelOutImpl
implements MultiConnTCPChannelOutAttributeController


Nested Class Summary
protected  class MultiConnTCPChannelOutImpl.ConnectionKey
           
 
Field Summary
protected  String chunkName
           
protected  int maxConnection
           
protected  Map openConnections
           
protected  MultiConnTCPChannelOutImpl.ConnectionKey reusableKey
           
protected  int soTimeout
           
 
Fields inherited from class org.objectweb.dream.channel.AbstractTCPChannelOutImpl
cnxRetry, messageCodecItf, messageManagerItf
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, componentDesc, fcState, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.dream.Push
IN_PUSH_ITF_NAME, OUT_PUSH_ITF_NAME
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
MultiConnTCPChannelOutImpl()
           
 
Method Summary
 String getDestinationChunkName()
          Returns the name of the IPChannelDestinationChunkchunk used by ChannelOut.
 int getMaxConnection()
          Returns the maximum number of connections.
 int getSoTimeout()
          Returns the SO_TIMEOUT.
 void push(Message message, Map context)
           
 void setDestinationChunkName(String name)
          Sets the name of the IPChannelDestinationChunkchunk used by ChannelOut.
 void setMaxConnection(int maxConnection)
          Sets the maximum number of connections.
protected  void setSocketOption(Socket sock)
          Configures this socket using the socket options established for this factory.
 void setSoTimeout(int timeout)
          Sets the SO_TIMEOUT.
 
Methods inherited from class org.objectweb.dream.channel.AbstractTCPChannelOutImpl
bindFc, closeSocket, connectSocket, getConnectionRetry, listFc, setConnectionRetry
 
Methods inherited from class org.objectweb.dream.AbstractComponent
getFcState, initComponent, lookupFc, setLogger, startFc, stopFc, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.dream.channel.ChannelOutAttributeController
getConnectionRetry, setConnectionRetry
 

Field Detail

chunkName

protected String chunkName

openConnections

protected Map openConnections

reusableKey

protected MultiConnTCPChannelOutImpl.ConnectionKey reusableKey

maxConnection

protected int maxConnection

soTimeout

protected int soTimeout
Constructor Detail

MultiConnTCPChannelOutImpl

public MultiConnTCPChannelOutImpl()
Method Detail

push

public void push(Message message,
                 Map context)
          throws PushException
Specified by:
push in interface Push
Throws:
PushException
See Also:
Push.push(Message, Map)

setSocketOption

protected void setSocketOption(Socket sock)
                        throws SocketException
Description copied from class: AbstractTCPChannelOutImpl
Configures this socket using the socket options established for this factory. It may be overloaded in subclass, in order to handle particular subclasses of sockets

Overrides:
setSocketOption in class AbstractTCPChannelOutImpl
Parameters:
sock - the socket.
Throws:
SocketException - for networking errors
See Also:
AbstractTCPChannelOutImpl.setSocketOption(Socket)

getDestinationChunkName

public String getDestinationChunkName()
Description copied from interface: MultiDestinationChannelOutAttributeController
Returns the name of the IPChannelDestinationChunkchunk used by ChannelOut.

Specified by:
getDestinationChunkName in interface MultiDestinationChannelOutAttributeController
Returns:
the name of the IPChannelDestinationChunkchunk used by ChannelOut.
See Also:
MultiDestinationChannelOutAttributeController.getDestinationChunkName()

setDestinationChunkName

public void setDestinationChunkName(String name)
Description copied from interface: MultiDestinationChannelOutAttributeController
Sets the name of the IPChannelDestinationChunkchunk used by ChannelOut.

Specified by:
setDestinationChunkName in interface MultiDestinationChannelOutAttributeController
Parameters:
name - the name of the IPChannelDestinationChunkchunk used by ChannelOut.
See Also:
MultiDestinationChannelOutAttributeController.setDestinationChunkName(String)

getMaxConnection

public int getMaxConnection()
Description copied from interface: MultiConnTCPChannelOutAttributeController
Returns the maximum number of connections.

Specified by:
getMaxConnection in interface MultiConnTCPChannelOutAttributeController
Returns:
the maximum number of connections.
See Also:
MultiConnTCPChannelInAttributeController.getMaxConnection()

setMaxConnection

public void setMaxConnection(int maxConnection)
Description copied from interface: MultiConnTCPChannelOutAttributeController
Sets the maximum number of connections.

Specified by:
setMaxConnection in interface MultiConnTCPChannelOutAttributeController
Parameters:
maxConnection - the maximum number of connections.
See Also:
MultiConnTCPChannelInAttributeController.setMaxConnection(int)

getSoTimeout

public int getSoTimeout()
Description copied from interface: MultiConnTCPChannelOutAttributeController
Returns the SO_TIMEOUT.

Specified by:
getSoTimeout in interface MultiConnTCPChannelOutAttributeController
Returns:
timeout, in milliseconds.
See Also:
MultiConnTCPChannelInAttributeController.getSoTimeout()

setSoTimeout

public void setSoTimeout(int timeout)
Description copied from interface: MultiConnTCPChannelOutAttributeController
Sets the SO_TIMEOUT.

Specified by:
setSoTimeout in interface MultiConnTCPChannelOutAttributeController
Parameters:
timeout - timeout, in milliseconds. if negative, use default value.
See Also:
MultiConnTCPChannelInAttributeController.setSoTimeout(int)


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