org.ow2.petals.kernel.server
Class FractalHelper

java.lang.Object
  extended by org.ow2.petals.kernel.server.FractalHelper

public class FractalHelper
extends java.lang.Object

This class helps fractal management for PEtALS.

Author:
alouis, rnaudin

Field Summary
static java.lang.String ADMIN_COMPONENT
          The Admin Service component name.
static java.lang.String AUTOLOADER_COMPONENT
          The autoloader component name.
static java.lang.String COMMUNICATION_COMPOSITE
          The Communication component name.
static java.lang.String CONFIGURATION_COMPONENT
          The configuration service component name.
static java.lang.String CONTAINER_COMPOSITE
          The Container component name.
static java.lang.String DEPLOYMENT_COMPONENT
          The deployment component name.
static java.lang.String ENDPOINT_COMPONENT
          The endpoint service component name.
static java.lang.String INSTALLATION_COMPONENT
          The installation component name.
static java.lang.String JBI_MANAGEMENT_COMPOSITE
          The JBI Management component name.
static java.lang.String JBI_MESSAGING_COMPOSITE
          the JBI messaging composite name.
static java.lang.String JMX_COMPONENT
          The JMX service component name.
static java.lang.String JNDI_COMPONENT
          The Jndi service component name.
static java.lang.String JNDIAGENT_COMPONENT
          The JNDI agent service component name.
static java.lang.String LOCAL_TRANSPORTER_COMPONENT
           
static java.lang.String LOGGER_COMPONENT
          The logger component name.
static java.lang.String PETALS_COMPOSITE
          Fractal Petals names.
static java.lang.String PETALSADMIN_COMPONENT
          The Petals admin service component name.
static java.lang.String ROUTER_COMPONENT
          The Router component name.
static java.lang.String ROUTER_MONITOR_COMPONENT
           
static java.lang.String STANDALONE_TRANSPORTER_COMPONENT
           
static java.lang.String SYSTEM_COMPOSITE
          The System component name.
static java.lang.String SYSTEMRECOVERY_COMPONENT
          The system recovery component name.
static java.lang.String TCP_TRANSPORTER_COMPONENT
           
static java.lang.String TOOL_COMPOSITE
          The Tool composite name.
static java.lang.String TOPOLOGY_COMPONENT
          The topology service component name.
static java.lang.String TRANSPORTER_COMPOSITE
          The Transporter composite.
static java.lang.String WEBSERVICEMANAGER_COMPONENT
          The WebService manager component.
 
Constructor Summary
FractalHelper()
           
 
Method Summary
static void addComponent(org.objectweb.fractal.api.Component newComponent, org.objectweb.fractal.api.Component parentComponent, java.util.List<Binding> listOfBindings)
          Add a component in a composite component.
static org.objectweb.fractal.api.Component createNewComponent(java.lang.String name)
          Create a new component.
static org.objectweb.fractal.api.Component createNewComponent(java.lang.String name, java.util.Map<java.lang.Object,java.lang.Object> context)
          Create a new component.
static org.objectweb.fractal.api.Component getComponentByName(org.objectweb.fractal.api.control.ContentController parentContentController, java.lang.String name)
           
static java.util.List<org.objectweb.fractal.api.Component> getComponentListByPrefix(org.objectweb.fractal.api.control.ContentController parentContentController, java.lang.String prefix)
           
static org.objectweb.fractal.adl.Factory getFactory()
          Get the factory to manage components.
static org.objectweb.fractal.api.control.LifeCycleController getLifeCycleControllerByName(org.objectweb.fractal.api.control.ContentController parentContentController, java.lang.String name)
          A utility function allowing to get a component LifeCycleController from a content controller.
static org.objectweb.fractal.api.Component getRecursiveComponentByName(org.objectweb.fractal.api.control.ContentController parentContentController, java.lang.String name)
          A utility function allowing to get a component from any content controller.
static boolean startComponent(org.objectweb.fractal.api.Component component)
          A utility function to start the given fractal component.
static boolean stopComponent(org.objectweb.fractal.api.Component component)
          A utility function to stop the given fractal component.
static void stopComposite(org.objectweb.fractal.api.Component composite)
          A utility function to stop the given fractal composite.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PETALS_COMPOSITE

public static final java.lang.String PETALS_COMPOSITE
Fractal Petals names.

See Also:
Constant Field Values

CONFIGURATION_COMPONENT

public static final java.lang.String CONFIGURATION_COMPONENT
The configuration service component name.

See Also:
Constant Field Values

COMMUNICATION_COMPOSITE

public static final java.lang.String COMMUNICATION_COMPOSITE
The Communication component name.

See Also:
Constant Field Values

TOPOLOGY_COMPONENT

public static final java.lang.String TOPOLOGY_COMPONENT
The topology service component name.

See Also:
Constant Field Values

JNDIAGENT_COMPONENT

public static final java.lang.String JNDIAGENT_COMPONENT
The JNDI agent service component name.

See Also:
Constant Field Values

JNDI_COMPONENT

public static final java.lang.String JNDI_COMPONENT
The Jndi service component name.

See Also:
Constant Field Values

JMX_COMPONENT

public static final java.lang.String JMX_COMPONENT
The JMX service component name.

See Also:
Constant Field Values

SYSTEM_COMPOSITE

public static final java.lang.String SYSTEM_COMPOSITE
The System component name.

See Also:
Constant Field Values

SYSTEMRECOVERY_COMPONENT

public static final java.lang.String SYSTEMRECOVERY_COMPONENT
The system recovery component name.

See Also:
Constant Field Values

JBI_MANAGEMENT_COMPOSITE

public static final java.lang.String JBI_MANAGEMENT_COMPOSITE
The JBI Management component name.

See Also:
Constant Field Values

ADMIN_COMPONENT

public static final java.lang.String ADMIN_COMPONENT
The Admin Service component name.

See Also:
Constant Field Values

DEPLOYMENT_COMPONENT

public static final java.lang.String DEPLOYMENT_COMPONENT
The deployment component name.

See Also:
Constant Field Values

INSTALLATION_COMPONENT

public static final java.lang.String INSTALLATION_COMPONENT
The installation component name.

See Also:
Constant Field Values

JBI_MESSAGING_COMPOSITE

public static final java.lang.String JBI_MESSAGING_COMPOSITE
the JBI messaging composite name.

See Also:
Constant Field Values

ENDPOINT_COMPONENT

public static final java.lang.String ENDPOINT_COMPONENT
The endpoint service component name.

See Also:
Constant Field Values

ROUTER_COMPONENT

public static final java.lang.String ROUTER_COMPONENT
The Router component name.

See Also:
Constant Field Values

ROUTER_MONITOR_COMPONENT

public static final java.lang.String ROUTER_MONITOR_COMPONENT
See Also:
Constant Field Values

LOGGER_COMPONENT

public static final java.lang.String LOGGER_COMPONENT
The logger component name.

See Also:
Constant Field Values

TRANSPORTER_COMPOSITE

public static final java.lang.String TRANSPORTER_COMPOSITE
The Transporter composite.

See Also:
Constant Field Values

STANDALONE_TRANSPORTER_COMPONENT

public static final java.lang.String STANDALONE_TRANSPORTER_COMPONENT
See Also:
Constant Field Values

LOCAL_TRANSPORTER_COMPONENT

public static final java.lang.String LOCAL_TRANSPORTER_COMPONENT
See Also:
Constant Field Values

TCP_TRANSPORTER_COMPONENT

public static final java.lang.String TCP_TRANSPORTER_COMPONENT
See Also:
Constant Field Values

CONTAINER_COMPOSITE

public static final java.lang.String CONTAINER_COMPOSITE
The Container component name.

See Also:
Constant Field Values

PETALSADMIN_COMPONENT

public static final java.lang.String PETALSADMIN_COMPONENT
The Petals admin service component name.

See Also:
Constant Field Values

AUTOLOADER_COMPONENT

public static final java.lang.String AUTOLOADER_COMPONENT
The autoloader component name.

See Also:
Constant Field Values

TOOL_COMPOSITE

public static final java.lang.String TOOL_COMPOSITE
The Tool composite name.

See Also:
Constant Field Values

WEBSERVICEMANAGER_COMPONENT

public static final java.lang.String WEBSERVICEMANAGER_COMPONENT
The WebService manager component.

See Also:
Constant Field Values
Constructor Detail

FractalHelper

public FractalHelper()
Method Detail

getFactory

public static final org.objectweb.fractal.adl.Factory getFactory()
                                                          throws org.objectweb.fractal.adl.ADLException
Get the factory to manage components.

Returns:
The factory
Throws:
org.objectweb.fractal.adl.ADLException - : occurs when the framework of Petals is incorrect

createNewComponent

public static final org.objectweb.fractal.api.Component createNewComponent(java.lang.String name)
                                                                    throws org.objectweb.fractal.adl.ADLException
Create a new component.

Parameters:
name - The class name of the component
Returns:
the new component
Throws:
org.objectweb.fractal.adl.ADLException - : occurs when the framework of Petals is incorrect

createNewComponent

public static final org.objectweb.fractal.api.Component createNewComponent(java.lang.String name,
                                                                           java.util.Map<java.lang.Object,java.lang.Object> context)
                                                                    throws org.objectweb.fractal.adl.ADLException
Create a new component.

Parameters:
name - The class name of the component
context - The map of parameters for the component
Returns:
the new component
Throws:
org.objectweb.fractal.adl.ADLException - : occurs when the framework of Petals is incorrect

getRecursiveComponentByName

public static final org.objectweb.fractal.api.Component getRecursiveComponentByName(org.objectweb.fractal.api.control.ContentController parentContentController,
                                                                                    java.lang.String name)
A utility function allowing to get a component from any content controller.

Parameters:
parentContentController - parentContentController
name - component name
Returns:
the component, null if not found

getComponentByName

public static org.objectweb.fractal.api.Component getComponentByName(org.objectweb.fractal.api.control.ContentController parentContentController,
                                                                     java.lang.String name)

getComponentListByPrefix

public static java.util.List<org.objectweb.fractal.api.Component> getComponentListByPrefix(org.objectweb.fractal.api.control.ContentController parentContentController,
                                                                                           java.lang.String prefix)

startComponent

public static final boolean startComponent(org.objectweb.fractal.api.Component component)
                                    throws org.objectweb.fractal.api.NoSuchInterfaceException,
                                           org.objectweb.fractal.api.control.IllegalLifeCycleException
A utility function to start the given fractal component.

Parameters:
component - the fractal component
Returns:
true if the component was found and stopped, false otherwise
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException - : impossible to stop the component
org.objectweb.fractal.api.control.IllegalLifeCycleException - : impossible to stop the component

stopComponent

public static final boolean stopComponent(org.objectweb.fractal.api.Component component)
                                   throws org.objectweb.fractal.api.NoSuchInterfaceException,
                                          org.objectweb.fractal.api.control.IllegalLifeCycleException
A utility function to stop the given fractal component.

Parameters:
component - the fractal component to stop
Returns:
true if the component was found and stopped, false otherwise
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException - : impossible to stop the component
org.objectweb.fractal.api.control.IllegalLifeCycleException - : impossible to stop the component

stopComposite

public static final void stopComposite(org.objectweb.fractal.api.Component composite)
                                throws org.objectweb.fractal.api.control.IllegalLifeCycleException,
                                       org.objectweb.fractal.api.NoSuchInterfaceException
A utility function to stop the given fractal composite. TODO: Must be remove when the bug no JBOSS environment would be resolved.

Parameters:
composite -
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException
org.objectweb.fractal.api.control.IllegalLifeCycleException
org.objectweb.fractal.api.NoSuchInterfaceException

addComponent

public static final void addComponent(org.objectweb.fractal.api.Component newComponent,
                                      org.objectweb.fractal.api.Component parentComponent,
                                      java.util.List<Binding> listOfBindings)
                               throws org.objectweb.fractal.api.NoSuchInterfaceException,
                                      org.objectweb.fractal.api.control.IllegalContentException,
                                      org.objectweb.fractal.api.control.IllegalLifeCycleException,
                                      org.objectweb.fractal.api.control.IllegalBindingException
Add a component in a composite component.

Parameters:
newComponent - The new component
parentComponent - The parent component
listOfBindings - the list of binding to create between this new component and the others
Throws:
org.objectweb.fractal.api.NoSuchInterfaceException - : Impossible to add a component
org.objectweb.fractal.api.control.IllegalLifeCycleException - : Impossible to add a component
org.objectweb.fractal.api.control.IllegalContentException - : Impossible to add a component
org.objectweb.fractal.api.control.IllegalBindingException - : Impossible to add a component

getLifeCycleControllerByName

public static final org.objectweb.fractal.api.control.LifeCycleController getLifeCycleControllerByName(org.objectweb.fractal.api.control.ContentController parentContentController,
                                                                                                       java.lang.String name)
A utility function allowing to get a component LifeCycleController from a content controller.

Parameters:
parentContentController - the parent content controller
name - the name of the component
Returns:
the LifeCycleController of the component, null if not found


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.