org.objectweb.fractal.gui.model
Class BasicConfiguration

java.lang.Object
  extended byorg.objectweb.fractal.gui.model.BasicConfiguration
All Implemented Interfaces:
BindingController, Configuration, Factory, LifeCycleController

public class BasicConfiguration
extends Object
implements Configuration, Factory, BindingController, LifeCycleController

Basic implementation of the Configuration interface.


Field Summary
static String CONFIGURATION_LISTENERS_BINDING
          A collection client interface bound to the listeners of this model.
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
BasicConfiguration()
          Constructs a new basic configuration component.
 
Method Summary
 void bindFc(String clientItfName, Object serverItf)
          Binds the client interface whose name is given to a server interface.
 ClientInterface createClientInterface(Component owner)
          Creates a new external client interface.
 Component createComponent()
          Creates a new component.
 Component createComponent(Component component)
          Creates a slave component.
 ServerInterface createServerInterface(Component owner)
          Creates a new external server interface.
 long getChangeCount()
          Returns the status of this configuration.
 String getFcState()
          Returns the execution state of the component to which this interface belongs.
 Component getRootComponent()
          Returns the root component of this configuration.
 String[] listFc()
          Returns the names of the client interfaces of the component to which this interface belongs.
 Object lookupFc(String clientItfName)
          Returns the interface to which the given client interface is bound.
 void setChangeCount(long changeCount)
          Sets the status of this configuration.
 void setRootComponent(Component root)
          Sets the root component of this configuration.
 void startFc()
          Starts the component to which this interface belongs.
 void stopFc()
          Stops the component to which this interface belongs.
 void unbindFc(String clientItfName)
          Unbinds the given client interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIGURATION_LISTENERS_BINDING

public static final String CONFIGURATION_LISTENERS_BINDING
A collection client interface bound to the listeners of this model.

See Also:
Constant Field Values
Constructor Detail

BasicConfiguration

public BasicConfiguration()
Constructs a new basic configuration component.

Method Detail

listFc

public String[] listFc()
Description copied from interface: BindingController
Returns the names of the client interfaces of the component to which this interface belongs.

Specified by:
listFc in interface BindingController
Returns:
the names of the client interfaces of the component to which this interface belongs.

lookupFc

public Object lookupFc(String clientItfName)
Description copied from interface: BindingController
Returns the interface to which the given client interface is bound. More precisely, returns the server interface to which the client interface whose name is given is bound. This server interface is necessarily in the same address space as the client interface (see bindFc).

Specified by:
lookupFc in interface BindingController
Parameters:
clientItfName - the name of a client interface of the component to which this interface belongs.
Returns:
the server interface to which the given interface is bound, or null if it is not bound.

bindFc

public void bindFc(String clientItfName,
                   Object serverItf)
Description copied from interface: BindingController
Binds the client interface whose name is given to a server interface. More precisely, binds the client interface of the component to which this interface belongs, and whose name is equal to the given name, to the given server interface. The given server interface must be in the same address space as the client interface.

Specified by:
bindFc in interface BindingController
Parameters:
clientItfName - the name of a client interface of the component to which this interface belongs.
serverItf - a server interface.

unbindFc

public void unbindFc(String clientItfName)
Description copied from interface: BindingController
Unbinds the given client interface. More precisely, unbinds the client interface of the component to which this interface belongs, and whose name is equal to the given name.

Specified by:
unbindFc in interface BindingController
Parameters:
clientItfName - the name of a client interface of the component to which this interface belongs.

getFcState

public String getFcState()
Description copied from interface: LifeCycleController
Returns the execution state of the component to which this interface belongs.

Specified by:
getFcState in interface LifeCycleController
Returns:
the execution state of the component to which this interface belongs.

startFc

public void startFc()
Description copied from interface: LifeCycleController
Starts the component to which this interface belongs.

Specified by:
startFc in interface LifeCycleController

stopFc

public void stopFc()
Description copied from interface: LifeCycleController
Stops the component to which this interface belongs. The result of a method call on a stopped component is undefined, except on its control interfaces (these calls are executed normally).

Specified by:
stopFc in interface LifeCycleController

getRootComponent

public Component getRootComponent()
Description copied from interface: Configuration
Returns the root component of this configuration.

Specified by:
getRootComponent in interface Configuration
Returns:
the root component of this configuration.
See Also:
Configuration.setRootComponent(org.objectweb.fractal.gui.model.Component)

setRootComponent

public void setRootComponent(Component root)
Description copied from interface: Configuration
Sets the root component of this configuration. This method notifies the configuration listeners, via the rootComponentChanged method.

Specified by:
setRootComponent in interface Configuration
Parameters:
root - the new root component of this configuration.
See Also:
Configuration.getRootComponent()

getChangeCount

public long getChangeCount()
Description copied from interface: Configuration
Returns the status of this configuration.

Specified by:
getChangeCount in interface Configuration
See Also:
Configuration.setChangeCount(long)

setChangeCount

public void setChangeCount(long changeCount)
Description copied from interface: Configuration
Sets the status of this configuration.

Specified by:
setChangeCount in interface Configuration
See Also:
Configuration.getChangeCount()

createComponent

public Component createComponent()
Description copied from interface: Factory
Creates a new component.

Specified by:
createComponent in interface Factory
Returns:
a newly created component.

createComponent

public Component createComponent(Component component)
Description copied from interface: Factory
Creates a slave component.

Specified by:
createComponent in interface Factory
Parameters:
component - a master component.
Returns:
a newly created slave component of the given master component.

createClientInterface

public ClientInterface createClientInterface(Component owner)
Description copied from interface: Factory
Creates a new external client interface.

Specified by:
createClientInterface in interface Factory
Parameters:
owner - a component.
Returns:
a newly created external client interface for the given component.

createServerInterface

public ServerInterface createServerInterface(Component owner)
Description copied from interface: Factory
Creates a new external server interface.

Specified by:
createServerInterface in interface Factory
Parameters:
owner - a component.
Returns:
a newly created external server interface for the given component.