org.ow2.petals.microkernel.api.server
Class FractalHelper

java.lang.Object
  extended by org.ow2.petals.microkernel.api.server.FractalHelper

public class FractalHelper
extends Object

This class helps fractal management for Petals.

Author:
Adrien Louis - EBM WebSourcing, Roland Naudin - EBM WebSourcing

Field Summary
static String ADMIN_COMPONENT
          The Admin Service component name.
static String COMMUNICATION_COMPOSITE
          The Communication component name.
static String CONFIGURATION_COMPONENT
          The configuration service component name.
static String CONTAINER_COMPOSITE
          The Container component name.
static String DEPLOYMENT_COMPONENT
          The deployment component name.
static String ENDPOINT_COMPONENT
          The endpoint service component name.
static String INSTALLATION_COMPONENT
          The installation component name.
static String JBI_MANAGEMENT_COMPOSITE
          The JBI Management component name.
static String JBI_MESSAGING_COMPOSITE
          the JBI messaging composite name.
static String JMX_COMPONENT
          The JMX service component name.
static String JNDI_COMPONENT
          The Jndi service component name.
static String JNDIAGENT_COMPONENT
          The JNDI agent service component name.
static String LOCAL_TRANSPORTER_COMPONENT
           
static String LOCAL_TRANSPORTER_MONITORING_COMPONENT
           
static String LOGGER_COMPONENT
          The logger component name.
static String PETALS_COMPOSITE
          Fractal Petals names.
static String PETALSADMIN_COMPONENT
          The Petals admin service component name.
static String ROUTER_COMPONENT
          The Router component name.
static String ROUTER_MONITOR_COMPONENT
           
static String SYSTEM_COMPOSITE
          The System component name.
static String SYSTEMRECOVERY_COMPONENT
          The system recovery component name.
static String TCP_TRANSPORTER_COMPONENT
           
static String TOPOLOGY_COMPONENT
          The topology service component name.
static String TRANSPORTER_COMPOSITE
          The Transporter composite.
 
Constructor Summary
FractalHelper()
           
 
Method Summary
static void addComponent(org.objectweb.fractal.api.Component newComponent, org.objectweb.fractal.api.Component parentComponent, List<Binding> listOfBindings)
          Add a component in a composite component.
static org.objectweb.fractal.api.Component createNewComponent(String name)
          Create a new component.
static org.objectweb.fractal.api.Component createNewComponent(String name, Map<Object,Object> context)
          Create a new component.
static org.objectweb.fractal.api.Component getComponentByName(org.objectweb.fractal.api.control.ContentController parentContentController, String name)
           
static List<org.objectweb.fractal.api.Component> getComponentListByPrefix(org.objectweb.fractal.api.control.ContentController parentContentController, 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, 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, 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 String PETALS_COMPOSITE
Fractal Petals names.

See Also:
Constant Field Values

CONFIGURATION_COMPONENT

public static final String CONFIGURATION_COMPONENT
The configuration service component name.

See Also:
Constant Field Values

COMMUNICATION_COMPOSITE

public static final String COMMUNICATION_COMPOSITE
The Communication component name.

See Also:
Constant Field Values

TOPOLOGY_COMPONENT

public static final String TOPOLOGY_COMPONENT
The topology service component name.

See Also:
Constant Field Values

JNDIAGENT_COMPONENT

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

See Also:
Constant Field Values

JNDI_COMPONENT

public static final String JNDI_COMPONENT
The Jndi service component name.

See Also:
Constant Field Values

JMX_COMPONENT

public static final String JMX_COMPONENT
The JMX service component name.

See Also:
Constant Field Values

SYSTEM_COMPOSITE

public static final String SYSTEM_COMPOSITE
The System component name.

See Also:
Constant Field Values

SYSTEMRECOVERY_COMPONENT

public static final String SYSTEMRECOVERY_COMPONENT
The system recovery component name.

See Also:
Constant Field Values

JBI_MANAGEMENT_COMPOSITE

public static final String JBI_MANAGEMENT_COMPOSITE
The JBI Management component name.

See Also:
Constant Field Values

ADMIN_COMPONENT

public static final String ADMIN_COMPONENT
The Admin Service component name.

See Also:
Constant Field Values

DEPLOYMENT_COMPONENT

public static final String DEPLOYMENT_COMPONENT
The deployment component name.

See Also:
Constant Field Values

INSTALLATION_COMPONENT

public static final String INSTALLATION_COMPONENT
The installation component name.

See Also:
Constant Field Values

JBI_MESSAGING_COMPOSITE

public static final String JBI_MESSAGING_COMPOSITE
the JBI messaging composite name.

See Also:
Constant Field Values

ENDPOINT_COMPONENT

public static final String ENDPOINT_COMPONENT
The endpoint service component name.

See Also:
Constant Field Values

ROUTER_COMPONENT

public static final String ROUTER_COMPONENT
The Router component name.

See Also:
Constant Field Values

ROUTER_MONITOR_COMPONENT

public static final String ROUTER_MONITOR_COMPONENT
See Also:
Constant Field Values

LOGGER_COMPONENT

public static final String LOGGER_COMPONENT
The logger component name.

See Also:
Constant Field Values

TRANSPORTER_COMPOSITE

public static final String TRANSPORTER_COMPOSITE
The Transporter composite.

See Also:
Constant Field Values

LOCAL_TRANSPORTER_COMPONENT

public static final String LOCAL_TRANSPORTER_COMPONENT
See Also:
Constant Field Values

LOCAL_TRANSPORTER_MONITORING_COMPONENT

public static final String LOCAL_TRANSPORTER_MONITORING_COMPONENT
See Also:
Constant Field Values

TCP_TRANSPORTER_COMPONENT

public static final String TCP_TRANSPORTER_COMPONENT
See Also:
Constant Field Values

CONTAINER_COMPOSITE

public static final String CONTAINER_COMPOSITE
The Container component name.

See Also:
Constant Field Values

PETALSADMIN_COMPONENT

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

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(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(String name,
                                                                           Map<Object,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,
                                                                                    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,
                                                                     String name)

getComponentListByPrefix

public static List<org.objectweb.fractal.api.Component> getComponentListByPrefix(org.objectweb.fractal.api.control.ContentController parentContentController,
                                                                                 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,
                                      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,
                                                                                                       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-2015 Linagora. All Rights Reserved.