public class ClifServerImpl extends java.lang.Object implements ClifServerControl
Modifier and Type | Field and Description |
---|---|
protected java.util.HashMap<java.lang.String,org.objectweb.fractal.api.Component> |
blades
contains blade components of this CLIF server, indexed by their identifier
|
CLIF_SERVER_CONTROL
Constructor and Description |
---|
ClifServerImpl()
Does nothing.
|
Modifier and Type | Method and Description |
---|---|
org.objectweb.fractal.api.Component |
addBlade(java.lang.String adlDefinition,
java.util.Map adlParams,
java.lang.String bladeId,
java.lang.String argument)
Creates a new blade component managed by this Clif server from an ADL definition.
|
static void |
create(java.lang.String name,
ClifRegistry registry)
Creates a CLIF server in current/local Fractal environment, and
binds it with the given name in the given registry.
|
static void |
main(java.lang.String[] args)
Creates a CLIF server and binds it in the CLIF registry.
|
void |
removeAllBlades()
Removes every blade from this CLIF server,
and clears the CLIF class loader cache.
|
void |
removeBlade(java.lang.String id)
Removes a blade from this Clif server.
|
protected java.util.HashMap<java.lang.String,org.objectweb.fractal.api.Component> blades
public static void create(java.lang.String name, ClifRegistry registry) throws ClifException
name
- bound name in the registryregistry
- registry where to bind this new CLIF serverClifException
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- if no argument is given, the CLIF server is bound to a default name
that is the network name of the local environment. Otherwise, the new CLIF server
is bound to the name given by the first argument (i.e. args[0]).java.lang.Exception
ExecutionContext.PREFETCH_FILE
public org.objectweb.fractal.api.Component addBlade(java.lang.String adlDefinition, java.util.Map adlParams, java.lang.String bladeId, java.lang.String argument) throws ClifException
addBlade
in interface ClifServerControl
adlDefinition
- ADL definition name of a blade implementationadlParams
- ADL parameters that will be used for blade instantiation
(parameters used by the ADL definition)bladeId
- identifier for the new blade (see BladeControl.setId(String)
),
also used to name the new blade component with regard to Fractal NameControllerargument
- blade argument (used to call method setArgument() in BladeControlClifException
public void removeAllBlades() throws ClifException
removeAllBlades
in interface ClifServerControl
ClifException
- if at least one blade could not be removed.
Note: all removable blades are removed before throwing the exception,
and the CLIF class loader cache is cleared anyway.public void removeBlade(java.lang.String id) throws ClifException
removeBlade
in interface ClifServerControl
id
- blade identifierClifException
- if this blade is unknown by this CLIF server.