org.objectweb.dream.channel
Class OpenedSocketManagerMultiPersistentImpl

java.lang.Object
  extended byorg.objectweb.dream.AbstractComponent
      extended byorg.objectweb.dream.channel.OpenedSocketManagerMultiPersistentImpl
All Implemented Interfaces:
AttributeController, BindingController, LifeCycleController, Loggable, OpenedSocket, OpenedSocketManagerMultiAttributeController

public class OpenedSocketManagerMultiPersistentImpl
extends AbstractComponent
implements OpenedSocket, OpenedSocketManagerMultiAttributeController

Opened socket manager component that lanage multiple opened sockets at a time. Each opened socket is executed by its own task.


Nested Class Summary
protected  class OpenedSocketManagerMultiPersistentImpl.InTask
           
 
Field Summary
protected  LinkedList availableSocketList
           
protected  OpenedSocket delegateOpenedSocketItf
           
protected  Task inTask
           
protected  int maxOpenedSocket
           
protected  int nbOpenedSocket
           
protected  ThreadPoolController threadPoolController
           
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, componentDesc, fcState, firstStart, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.dream.channel.OpenedSocket
ITF_NAME
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
OpenedSocketManagerMultiPersistentImpl()
           
 
Method Summary
protected  void beforeFirstStart(Component componentItf)
           
 void bindFc(String clientItfName, Object serverItf)
           
 int getMaxOpenedSocket()
          Returns the maximum number of opened socket.
 String[] listFc()
           
 void openedSocket(SocketState socket)
          Gives an opened socket.
 void setMaxOpenedSocket(int maxOpenedSocket)
          Sets the maxOpenedSocket attribute's value.
 void startFc()
           
 void stopFc()
           
 
Methods inherited from class org.objectweb.dream.AbstractComponent
getFcState, initComponent, lookupFc, setLogger, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inTask

protected Task inTask

threadPoolController

protected ThreadPoolController threadPoolController

availableSocketList

protected LinkedList availableSocketList

maxOpenedSocket

protected int maxOpenedSocket

nbOpenedSocket

protected int nbOpenedSocket

delegateOpenedSocketItf

protected OpenedSocket delegateOpenedSocketItf
Constructor Detail

OpenedSocketManagerMultiPersistentImpl

public OpenedSocketManagerMultiPersistentImpl()
Method Detail

beforeFirstStart

protected void beforeFirstStart(Component componentItf)
                         throws IllegalLifeCycleException
Throws:
IllegalLifeCycleException
See Also:
AbstractComponent.beforeFirstStart(org.objectweb.fractal.api.Component)

openedSocket

public void openedSocket(SocketState socket)
                  throws IOException,
                         InterruptedException
Description copied from interface: OpenedSocket
Gives an opened socket.

Specified by:
openedSocket in interface OpenedSocket
Parameters:
socket - a socket state
Throws:
IOException - if an IO error occurs.
InterruptedException - if the execution of the method has been interrupted.
See Also:
OpenedSocket.openedSocket(SocketState)

getMaxOpenedSocket

public int getMaxOpenedSocket()
Description copied from interface: OpenedSocketManagerMultiAttributeController
Returns the maximum number of opened socket.

Specified by:
getMaxOpenedSocket in interface OpenedSocketManagerMultiAttributeController
Returns:
the maxOpenedSocket attribute's value.
See Also:
OpenedSocketManagerMultiAttributeController.getMaxOpenedSocket()

setMaxOpenedSocket

public void setMaxOpenedSocket(int maxOpenedSocket)
Description copied from interface: OpenedSocketManagerMultiAttributeController
Sets the maxOpenedSocket attribute's value.

Specified by:
setMaxOpenedSocket in interface OpenedSocketManagerMultiAttributeController
Parameters:
maxOpenedSocket - the new maxOpenedSocket attribute's value.
See Also:
OpenedSocketManagerMultiAttributeController.setMaxOpenedSocket(int)

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()

listFc

public String[] listFc()
Specified by:
listFc in interface BindingController
See Also:
BindingController.listFc()

bindFc

public void bindFc(String clientItfName,
                   Object serverItf)
            throws NoSuchInterfaceException,
                   IllegalBindingException,
                   IllegalLifeCycleException
Specified by:
bindFc in interface BindingController
Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
See Also:
BindingController.bindFc(String, Object)


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