org.mule.api.registry
Interface Registry

All Superinterfaces:
Disposable, Initialisable
All Known Implementing Classes:
AbstractRegistry, SpringRegistry, TransientRegistry

public interface Registry
extends Initialisable, Disposable


Field Summary
static int DEFAULT_SCOPE
           
static int SCOPE_IMMEDIATE
           
static int SCOPE_LOCAL
           
static int SCOPE_REMOTE
           
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Method Summary
 Collection getAgents()
          Deprecated. Use lookupAgent() instead
 Collection getConnectors()
          Deprecated. Use lookupConnector() instead
 int getDefaultScope()
           
 Collection getEndpoints()
          Deprecated. Use lookupEndpoint() instead
 Collection getModels()
          Deprecated. Use lookupModel() instead
 Registry getParent()
           
 String getRegistryId()
           
 Collection getTransformers()
          Deprecated. Use lookupTransformer() instead
 boolean isDisposed()
           
 boolean isDisposing()
           
 boolean isInitialised()
           
 boolean isInitialising()
           
 boolean isReadOnly()
           
 boolean isRemote()
           
 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)
           
 Object lookupObject(Class type)
          Look up a single object by type.
 Object lookupObject(Class type, int scope)
          Look up a single object by type.
 Object lookupObject(String key)
          Look up a single object by name.
 Object lookupObject(String key, int scope)
          Look up a single object by name.
 Collection lookupObjects(Class type)
          Look up all objects of a given type.
 Collection lookupObjects(Class type, int scope)
          Look up all objects of a given type.
 Service lookupService(String component)
           
 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 registerObject(String key, Object value)
           
 void registerObject(String key, Object value, Object metadata)
           
 void registerObjects(Map objects)
           
 void registerService(Service service)
           
 void registerTransformer(Transformer transformer)
           
 void setDefaultScope(int scope)
           
 void setParent(Registry registry)
           
 void unregisterAgent(String agentName)
           
 void unregisterConnector(String connectorName)
           
 void unregisterEndpoint(String endpointName)
           
 void unregisterModel(String modelName)
           
 void unregisterObject(String key)
           
 void unregisterService(String serviceName)
           
 void unregisterTransformer(String transformerName)
           
 
Methods inherited from interface org.mule.api.lifecycle.Initialisable
initialise
 
Methods inherited from interface org.mule.api.lifecycle.Disposable
dispose
 

Field Detail

SCOPE_IMMEDIATE

static final int SCOPE_IMMEDIATE
See Also:
Constant Field Values

SCOPE_LOCAL

static final int SCOPE_LOCAL
See Also:
Constant Field Values

SCOPE_REMOTE

static final int SCOPE_REMOTE
See Also:
Constant Field Values

DEFAULT_SCOPE

static final int DEFAULT_SCOPE
See Also:
Constant Field Values
Method Detail

lookupObject

Object lookupObject(String key)
Look up a single object by name.


lookupObject

Object lookupObject(String key,
                    int scope)
Look up a single object by name.


lookupObjects

Collection lookupObjects(Class type)
Look up all objects of a given type.


lookupObjects

Collection lookupObjects(Class type,
                         int scope)
Look up all objects of a given type.


lookupObject

Object lookupObject(Class type)
                    throws RegistrationException
Look up a single object by type.

Throws:
RegistrationException

lookupObject

Object lookupObject(Class type,
                    int scope)
                    throws RegistrationException
Look up a single object by type.

Throws:
RegistrationException

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 component)

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 lookupEndpoint() instead


getAgents

Collection getAgents()
Deprecated. Use lookupAgent() instead


getTransformers

Collection getTransformers()
Deprecated. Use lookupTransformer() instead


registerObject

void registerObject(String key,
                    Object value)
                    throws RegistrationException
Throws:
RegistrationException

registerObject

void registerObject(String key,
                    Object value,
                    Object metadata)
                    throws RegistrationException
Throws:
RegistrationException

registerObjects

void registerObjects(Map objects)
                     throws RegistrationException
Throws:
RegistrationException

unregisterObject

void unregisterObject(String key)
                      throws MuleException
Throws:
MuleException

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

lookupServiceDescriptor

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

getParent

Registry getParent()

setParent

void setParent(Registry registry)

getRegistryId

String getRegistryId()

isReadOnly

boolean isReadOnly()

isRemote

boolean isRemote()

setDefaultScope

void setDefaultScope(int scope)

getDefaultScope

int getDefaultScope()

isInitialised

boolean isInitialised()

isInitialising

boolean isInitialising()

isDisposed

boolean isDisposed()

isDisposing

boolean isDisposing()


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