org.objectweb.dream.protocol.channel
Class ConnectionFactoryImpl

java.lang.Object
  extended by org.objectweb.dream.AbstractComponent
      extended by org.objectweb.dream.protocol.channel.ConnectionFactoryImpl
All Implemented Interfaces:
ContextualBindingController, NeedAsyncStartController, PrepareStopLifeCycleController, Loggable, ConnectionFactory, BindingController, LifeCycleController

public class ConnectionFactoryImpl
extends AbstractComponent
implements ConnectionFactory

Implementation of ConnectionFactory.


Nested Class Summary
protected  class ConnectionFactoryImpl.ListenTask
           
protected  class ConnectionFactoryImpl.SessionFactory
           
 
Field Summary
protected  ConnectionManager connectionManagerItf
           
protected  ConnectionFactoryImpl.SessionFactory firstAvailable
           
protected  ConnectionFactoryImpl.SessionFactory lastAvailable
           
protected  ConnectionFactoryImpl.ListenTask listenTask
           
protected  Map<IPExportIdentifier,ConnectionFactoryImpl.SessionFactory> sessionFactories
           
protected  ThreadPoolManager threadPoolManager
           
 
Fields inherited from class org.objectweb.dream.AbstractComponent
bindingLogger, fcNeedAsyncStart, fcState, lifeCycleLogger, logger, weaveableC
 
Fields inherited from interface org.objectweb.dream.protocol.channel.ConnectionFactory
ITF_NAME
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
ConnectionFactoryImpl()
           
 
Method Summary
 void addServerSocket(ServerSocket serverSocket, IPExportIdentifier identifier)
          Adds a new server socket.
protected  void beforeFirstStart(Component componentItf)
           
 void bindFc(String clientItfName, Object serverItf)
           
protected  ConnectionFactoryImpl.SessionFactory getAvailable()
           
 String[] listFc()
           
 void prepareStopFc()
           
 void removeServerSocket(IPExportIdentifier identifier)
          Removes and closes the server socket associated with the given identifier.
protected  void setAvailable(ConnectionFactoryImpl.SessionFactory session)
           
 
Methods inherited from class org.objectweb.dream.AbstractComponent
bindFc, getFcNeedAsyncStart, 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
 

Field Detail

firstAvailable

protected ConnectionFactoryImpl.SessionFactory firstAvailable

lastAvailable

protected ConnectionFactoryImpl.SessionFactory lastAvailable

sessionFactories

protected Map<IPExportIdentifier,ConnectionFactoryImpl.SessionFactory> sessionFactories

threadPoolManager

protected ThreadPoolManager threadPoolManager

listenTask

protected ConnectionFactoryImpl.ListenTask listenTask

connectionManagerItf

protected ConnectionManager connectionManagerItf
Constructor Detail

ConnectionFactoryImpl

public ConnectionFactoryImpl()
Method Detail

addServerSocket

public void addServerSocket(ServerSocket serverSocket,
                            IPExportIdentifier identifier)
Description copied from interface: ConnectionFactory
Adds a new server socket.

Specified by:
addServerSocket in interface ConnectionFactory
Parameters:
serverSocket - the server socket.
identifier - the export identifier associated with the server socket.
See Also:
ConnectionFactory.addServerSocket(ServerSocket, IPExportIdentifier)

removeServerSocket

public void removeServerSocket(IPExportIdentifier identifier)
                        throws InvalidExportIdentifierException
Description copied from interface: ConnectionFactory
Removes and closes the server socket associated with the given identifier.

Specified by:
removeServerSocket in interface ConnectionFactory
Parameters:
identifier - an identifier of a previously added server socket.
Throws:
InvalidExportIdentifierException - if the given export identifier is unknown.
See Also:
ConnectionFactory.removeServerSocket(IPExportIdentifier)

setAvailable

protected void setAvailable(ConnectionFactoryImpl.SessionFactory session)

getAvailable

protected ConnectionFactoryImpl.SessionFactory getAvailable()

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
Overrides:
bindFc in class AbstractComponent
Throws:
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
See Also:
AbstractComponent.bindFc(String, Object)

beforeFirstStart

protected void beforeFirstStart(Component componentItf)
                         throws IllegalLifeCycleException
Overrides:
beforeFirstStart in class AbstractComponent
Throws:
IllegalLifeCycleException
See Also:
AbstractComponent.beforeFirstStart(Component)

prepareStopFc

public void prepareStopFc()
                   throws IllegalLifeCycleException
Specified by:
prepareStopFc in interface PrepareStopLifeCycleController
Overrides:
prepareStopFc in class AbstractComponent
Throws:
IllegalLifeCycleException
See Also:
PrepareStopLifeCycleController.prepareStopFc()


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