|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dream.AbstractComponent
Base implementation of Dream components. This class is provided for
convenience. It is not mandatory for a component implementation to be a
subclasse of this class.
This class provides implementation of BindingController
methods. Bindings are stored in a Map
. When a component
has client interfaces, it is recommended to override (at least) the
bindFc
method.
Field Summary | |
protected Logger |
bindingLogger
the controller logger associated with the binding controller of this component |
protected Component |
componentDesc
The Component description object associated with this component |
protected String |
fcState
this attribut give the state of Dream Component. |
protected boolean |
firstStart
A boolean that indicates whether this is the first start or not. |
protected Logger |
lifeCycleLogger
the controller logger associated with the life cycle controller of this component |
protected Logger |
logger
the functional logger of this component |
Component |
weaveableC
the Component controller interface reference of this component |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
STARTED, STOPPED |
Constructor Summary | |
AbstractComponent()
Constructor method create the hashtable of bindings and initialize fcState to LifeCycleController.STOPPED. |
Method Summary | |
protected void |
beforeFirstStart(Component componentItf)
This method is called the first time the component is started. |
void |
bindFc(String clientItfName,
Object serverItf)
|
String |
getFcState()
|
protected void |
initComponent(Component componentItf)
Initializes this component. |
Object |
lookupFc(String clientItfName)
|
void |
setLogger(String name,
Logger l)
Gives the logger. |
void |
startFc()
|
void |
stopFc()
|
void |
unbindFc(String clientItfName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.fractal.api.control.BindingController |
listFc |
Field Detail |
public Component weaveableC
Component
controller interface reference of this component
protected Logger logger
protected Logger lifeCycleLogger
protected Logger bindingLogger
protected String fcState
LifeCycleController.STARTED
LifeCycleController.STOPPED
protected Component componentDesc
Component
description object associated with this component
protected boolean firstStart
Constructor Detail |
public AbstractComponent()
Method Detail |
protected void initComponent(Component componentItf) throws InitializationException
protected void initComponent(Component componentItf) { super.initComponent(componentItf); // initialisation code here ... }
componentItf
- the Component
interface of this component.
InitializationException
- if an error occurs.protected void beforeFirstStart(Component componentItf) throws IllegalLifeCycleException
componentItf
- the Component
interface of this component.
IllegalLifeCycleException
public void setLogger(String name, Logger l)
Loggable
setLogger
in interface Loggable
name
- the registration name.l
- the logger.Loggable.setLogger(String, Logger)
public String getFcState()
getFcState
in interface LifeCycleController
LifeCycleController.getFcState()
public void stopFc() throws IllegalLifeCycleException
stopFc
in interface LifeCycleController
IllegalLifeCycleException
LifeCycleController.stopFc()
public void startFc() throws IllegalLifeCycleException
startFc
in interface LifeCycleController
IllegalLifeCycleException
LifeCycleController.startFc()
public Object lookupFc(String clientItfName) throws NoSuchInterfaceException
lookupFc
in interface BindingController
NoSuchInterfaceException
BindingController.lookupFc(String)
public void bindFc(String clientItfName, Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException
bindFc
in interface BindingController
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
BindingController.bindFc(String, Object)
public void unbindFc(String clientItfName) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException
unbindFc
in interface BindingController
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
BindingController.unbindFc(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |