Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.api.registry
Interface MuleRegistry

All Superinterfaces:
  Disposable, Initialisable, Registry

All Known Implementing Classes:
  MuleRegistryHelper

    public interface MuleRegistry

extends Registry

Adds lookup/register/unregister methods for Mule-specific entities to the standard Registry interface.

Field Summary
`static String` | `LIFECYCLE_BYPASS_FLAG` Pass this flag as metadata of the `Registry.registerObject(String, Object, Object)` method to have lifecycle method calls on the registered objects omitted.

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Disposable
`PHASE_NAME`

Method Summary
`Object` | `applyLifecycle(Object object)` Will execute any lifecycle phases on an object without actually registering the object in the registry.
`Object` | `applyProcessors(Object object)` Will execute any processors on an object without actually registering the object in the registry.
`Object` | `applyProcessorsAndLifecycle(Object object)` Will execute any processors on an object and fire any lifecycle methods according to the current lifecycle without actually registering the object in the registry.
`Collection` | `getAgents()` Deprecated. Use lookupAgent() instead
`Collection` | `getConnectors()` Deprecated. Use lookupConnector() instead
`Collection` | `getEndpoints()` Deprecated. Use `EndpointFactory` for creation/lookup of individual endpoints instead
`Collection` | `getModels()` Deprecated. Use lookupModel() instead
`Collection` | `getTransformers()` Deprecated. Use lookupTransformer() instead
`Agent` | `lookupAgent(String agentName)`
`Connector` | `lookupConnector(String name)`
`EndpointBuilder` | `lookupEndpointBuilder(String name)` Looks-up endpoint builders which can be used to repeatably create endpoints with the same configuration.
`EndpointFactory` | `lookupEndpointFactory()`
`Model` | `lookupModel(String name)`
`Service` | `lookupService(String name)`
`ServiceDescriptor` | `lookupServiceDescriptor(String type, String name, Properties overrides)`
`Collection` | `lookupServices()`
`Collection` | `lookupServices(String model)`
`Model` | `lookupSystemModel()`
`Transformer` | `lookupTransformer(Class input, Class output)` Will find a transformer that is the closest match to the desired input and output.
`Transformer` | `lookupTransformer(String name)`
`List` | `lookupTransformers(Class input, Class output)` This method will return a list of `Transformer` objects that accept the given input and return the given output type of object
`void` | `registerAgent(Agent agent)`
`void` | `registerConnector(Connector connector)`
`void` | `registerEndpoint(ImmutableEndpoint endpoint)`
`void` | `registerEndpointBuilder(String name, EndpointBuilder builder)`
`void` | `registerModel(Model model)`
`void` | `registerService(Service service)`
`void` | `registerTransformer(Transformer transformer)`
`void` | `unregisterAgent(String agentName)`
`void` | `unregisterConnector(String connectorName)`
`void` | `unregisterEndpoint(String endpointName)`
`void` | `unregisterModel(String modelName)`
`void` | `unregisterService(String serviceName)`
`void` | `unregisterTransformer(String transformerName)`

Methods inherited from interface org.mule.api.registry.Registry
`getRegistryId, isReadOnly, isRemote, lookupObject, lookupObject, lookupObjects, registerObject, registerObject, registerObjects, unregisterObject, unregisterObject`

Methods inherited from interface org.mule.api.lifecycle.Initialisable
`initialise`

Methods inherited from interface org.mule.api.lifecycle.Disposable
`dispose`

Field Detail

### LIFECYCLE_BYPASS_FLAG

    static final String LIFECYCLE_BYPASS_FLAG

  Pass this flag as metadata of the `Registry.registerObject(String, Object, Object)` method to have lifecycle method calls on the registered objects omitted. Unless extending Mule, one will probably never have a use for this.

  See Also:
    `Registry.registerObject(String, Object, Object)`, Constant Field Values

Method Detail

### lookupConnector

    Connector lookupConnector(String name)

### lookupEndpointBuilder

    EndpointBuilder lookupEndpointBuilder(String name)

  Looks-up endpoint builders which can be used to repeatably create endpoints with the same configuration. These endpoint builder are either global endpoints or they are builders used to create named endpoints configured on routers and exception strategies.

### lookupEndpointFactory

    EndpointFactory lookupEndpointFactory()

### lookupTransformer

    Transformer lookupTransformer(String name)

### lookupService

    Service lookupService(String name)

### lookupTransformers

    List lookupTransformers(Class input,
                            Class output)

  This method will return a list of `Transformer` objects that accept the given input and return the given output type of object

  Parameters:
    `input` - The desiered input type for the transformer
    `output` - the desired output type for the transformer
  Returns:
    a list of matching transformers. If there were no matchers an empty list is returned.

### lookupTransformer

    Transformer lookupTransformer(Class input,
                                  Class output)
                                  throws TransformerException

  Will find a transformer that is the closest match to the desired input and output.

  Parameters:
    `input` - The desiered input type for the transformer
    `output` - the desired output type for the transformer
  Returns:
    A transformer that exactly matches or the will accept the input and output parameters
  Throws:
    `TransformerException` - will be thrown if there is more than one match

### lookupServices

    Collection lookupServices(String model)

### lookupServices

    Collection lookupServices()

### lookupModel

    Model lookupModel(String name)

### lookupSystemModel

    Model lookupSystemModel()

### lookupAgent

    Agent lookupAgent(String agentName)

### getModels

    Collection getModels()

  Deprecated. Use lookupModel() instead

### getConnectors

    Collection getConnectors()

  Deprecated. Use lookupConnector() instead

### getEndpoints

    Collection getEndpoints()

  Deprecated. Use `EndpointFactory` for creation/lookup of individual endpoints instead

### getAgents

    Collection getAgents()

  Deprecated. Use lookupAgent() instead

### getTransformers

    Collection getTransformers()

  Deprecated. Use lookupTransformer() instead

### registerConnector

    void registerConnector(Connector connector)
                           throws MuleException

  Throws:
    `MuleException`

### unregisterConnector

    void unregisterConnector(String connectorName)
                             throws MuleException

  Throws:
    `MuleException`

### registerEndpoint

    void registerEndpoint(ImmutableEndpoint endpoint)
                          throws MuleException

  Throws:
    `MuleException`

### unregisterEndpoint

    void unregisterEndpoint(String endpointName)
                            throws MuleException

  Throws:
    `MuleException`

### registerEndpointBuilder

    void registerEndpointBuilder(String name,
                                 EndpointBuilder builder)
                                 throws MuleException

  Throws:
    `MuleException`

### registerTransformer

    void registerTransformer(Transformer transformer)
                             throws MuleException

  Throws:
    `MuleException`

### unregisterTransformer

    void unregisterTransformer(String transformerName)
                               throws MuleException

  Throws:
    `MuleException`

### registerService

    void registerService(Service service)
                         throws MuleException

  Throws:
    `MuleException`

### unregisterService

    void unregisterService(String serviceName)
                           throws MuleException

  Throws:
    `MuleException`

### registerModel

    void registerModel(Model model)
                       throws MuleException

  Throws:
    `MuleException`

### unregisterModel

    void unregisterModel(String modelName)
                         throws MuleException

  Throws:
    `MuleException`

### registerAgent

    void registerAgent(Agent agent)
                       throws MuleException

  Throws:
    `MuleException`

### unregisterAgent

    void unregisterAgent(String agentName)
                         throws MuleException

  Throws:
    `MuleException`

### applyProcessorsAndLifecycle

    Object applyProcessorsAndLifecycle(Object object)
                                       throws MuleException

  Will execute any processors on an object and fire any lifecycle methods according to the current lifecycle without actually registering the object in the registry. This is useful for prototype objects that are created per request and would clutter the registry with single use objects. Not that this will only be applied to Mule registies. Thrid party registries such as Guice support wiring, but you need to get a reference to the container/context to call the method. This is so that wiring mechanisms dont trip over each other.

  Parameters:
    `object` - the object to process
  Returns:
    the same object with any processors and lifecycle methods called
  Throws:
    `MuleException` - if the registry fails to perform the lifecycle change or process object processors for the object.

### applyProcessors

    Object applyProcessors(Object object)
                           throws MuleException

  Will execute any processors on an object without actually registering the object in the registry. This is useful for prototype objects that are created per request and would clutter the registry with single use objects. Not that this will only be applied to Mule registies. Thrid party registries such as Guice support wiring, but you need to get a reference to the container/context to call the method. This is so that wiring mechanisms dont trip over each other.

  Parameters:
    `object` - the object to process
  Returns:
    the same object with any processors called
  Throws:
    `MuleException` - if the registry fails to process object processors for the object.

### applyLifecycle

    Object applyLifecycle(Object object)
                          throws MuleException

  Will execute any lifecycle phases on an object without actually registering the object in the registry. This is useful for prototype objects that are created per request and would clutter the registry with single use objects. The lifecycle applied is the lifecycle of the MuleContext. If multiple phases have been completed i.e. init and start, each phase will be executed on the object in order.

  Parameters:
    `object` - the object to apply the current lifecycle state to
  Returns:
    the same object with any lifecycle methods called
  Throws:
    `MuleException` - if the registry fails to execute a lifecycle method.

### lookupServiceDescriptor

    ServiceDescriptor lookupServiceDescriptor(String type,
                                              String name,
                                              Properties overrides)
                                              throws ServiceException

  Throws:
    `ServiceException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.