org.objectweb.dream.channel
Class MultiConnTCPChannelInImpl
java.lang.Object
org.objectweb.dream.AbstractComponent
org.objectweb.dream.channel.AbstractTCPChannelInImpl
org.objectweb.dream.channel.MultiConnTCPChannelInImpl
- All Implemented Interfaces:
- AttributeController, BindingController, IPChannelInAttributeController, LifeCycleController, Loggable, MultiConnTCPChannelInAttributeController
- public class MultiConnTCPChannelInImpl
- extends AbstractTCPChannelInImpl
- implements MultiConnTCPChannelInAttributeController
ChannelIn implementation accepting multiple connection at the same time. For
each connection a thread is created to read incomming messages.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
listen
protected ServerSocket listen
- The
ServerSocket
used by this component
connectionTask
protected Task connectionTask
inTask
protected Task inTask
threadPoolController
protected ThreadPoolController threadPoolController
threadPoolAttributeController
protected ThreadPoolAttributeController threadPoolAttributeController
availableSocketList
protected LinkedList availableSocketList
maxConnection
protected int maxConnection
nbConnection
protected int nbConnection
soTimeout
protected int soTimeout
MultiConnTCPChannelInImpl
public MultiConnTCPChannelInImpl()
initComponent
protected void initComponent(Component componentItf)
throws InitializationException
- Throws:
InitializationException
setSocketOption
protected void setSocketOption(Socket sock)
throws SocketException
- Description copied from class:
AbstractTCPChannelInImpl
- 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 AbstractTCPChannelInImpl
- Parameters:
sock
- the socket.
- Throws:
SocketException
- for networking errors- See Also:
AbstractTCPChannelInImpl.setSocketOption(Socket)
startFc
public void startFc()
throws IllegalLifeCycleException
- Specified by:
startFc
in interface LifeCycleController
- Throws:
IllegalLifeCycleException
- See Also:
AbstractComponent.startFc()
stopFc
public void stopFc()
throws IllegalLifeCycleException
- Specified by:
stopFc
in interface LifeCycleController
- Throws:
IllegalLifeCycleException
- See Also:
LifeCycleController.stopFc()
getMaxConnection
public int getMaxConnection()
- Description copied from interface:
MultiConnTCPChannelInAttributeController
- Returns the maximum number of connections.
- Specified by:
getMaxConnection
in interface MultiConnTCPChannelInAttributeController
- Returns:
- the maximum number of connections.
- See Also:
MultiConnTCPChannelInAttributeController.getMaxConnection()
setMaxConnection
public void setMaxConnection(int maxConnection)
- Description copied from interface:
MultiConnTCPChannelInAttributeController
- Sets the maximum number of connections.
- Specified by:
setMaxConnection
in interface MultiConnTCPChannelInAttributeController
- Parameters:
maxConnection
- the maximum number of connections.- See Also:
MultiConnTCPChannelInAttributeController.setMaxConnection(int)
getSoTimeout
public int getSoTimeout()
- Description copied from interface:
MultiConnTCPChannelInAttributeController
- Returns the
SO_TIMEOUT
.
- Specified by:
getSoTimeout
in interface MultiConnTCPChannelInAttributeController
- Returns:
- timeout, in milliseconds.
- See Also:
MultiConnTCPChannelInAttributeController.getSoTimeout()
setSoTimeout
public void setSoTimeout(int timeout)
- Description copied from interface:
MultiConnTCPChannelInAttributeController
- Sets the
SO_TIMEOUT
.
- Specified by:
setSoTimeout
in interface MultiConnTCPChannelInAttributeController
- Parameters:
timeout
- timeout, in milliseconds. if negative, use default value.- See Also:
MultiConnTCPChannelInAttributeController.setSoTimeout(int)
Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.