|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.registry.AbstractRegistry
public abstract class AbstractRegistry
Field Summary | |
---|---|
protected Map |
exactTransformerCache
|
protected LifecycleManager |
lifecycleManager
|
protected Log |
logger
|
protected Map |
transformerListCache
|
Fields inherited from interface org.mule.api.registry.Registry |
---|
DEFAULT_SCOPE, SCOPE_IMMEDIATE, SCOPE_LOCAL, SCOPE_REMOTE |
Fields inherited from interface org.mule.api.lifecycle.Initialisable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Disposable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
protected |
AbstractRegistry(String id)
Default Constructor |
protected |
AbstractRegistry(String id,
Registry parent)
|
Method Summary | |
---|---|
protected abstract LifecycleManager |
createLifecycleManager()
|
void |
dispose()
A lifecycle method where implementor should free up any resources. |
protected void |
doDispose()
|
protected void |
doInitialise()
|
protected abstract Object |
doLookupObject(String key)
|
protected abstract Collection |
doLookupObjects(Class type)
|
protected abstract void |
doRegisterObject(String key,
Object value,
Object metadata)
|
protected abstract void |
doRegisterTransformer(Transformer transformer)
|
Collection |
getAgents()
|
Collection |
getConnectors()
|
int |
getDefaultScope()
|
Collection |
getEndpoints()
|
protected LifecycleManager |
getLifecycleManager()
|
Collection |
getModels()
|
protected Transformer |
getNearestTransformerMatch(List trans,
Class input,
Class output)
|
Registry |
getParent()
|
String |
getRegistryId()
|
Collection |
getTransformers()
|
void |
initialise()
Method used to perform any initialisation work. |
boolean |
isDisposed()
|
boolean |
isDisposing()
|
boolean |
isInitialised()
|
boolean |
isInitialising()
|
Agent |
lookupAgent(String name)
|
Connector |
lookupConnector(String name)
|
ImmutableEndpoint |
lookupEndpoint(String name)
Removed this method from Registry API as it should only be used
internally and may confuse users. |
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 name)
|
Collection |
lookupServices()
|
Collection |
lookupServices(String model)
|
Model |
lookupSystemModel()
|
Transformer |
lookupTransformer(Class inputType,
Class outputType)
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 |
registerObject(String key,
Object value)
|
void |
registerObject(String key,
Object value,
Object metadata)
|
void |
registerTransformer(Transformer transformer)
|
void |
setDefaultScope(int scope)
|
void |
setParent(Registry registry)
|
protected void |
unsupportedOperation(String operation,
Object o)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.mule.api.registry.Registry |
---|
isReadOnly, isRemote, lookupServiceDescriptor, registerAgent, registerConnector, registerEndpoint, registerEndpointBuilder, registerModel, registerObjects, registerService, unregisterAgent, unregisterConnector, unregisterEndpoint, unregisterModel, unregisterObject, unregisterService, unregisterTransformer |
Field Detail |
---|
protected transient Log logger
protected LifecycleManager lifecycleManager
protected Map transformerListCache
protected Map exactTransformerCache
Constructor Detail |
---|
protected AbstractRegistry(String id)
protected AbstractRegistry(String id, Registry parent)
Method Detail |
---|
protected abstract LifecycleManager createLifecycleManager()
protected LifecycleManager getLifecycleManager()
public final void dispose()
Disposable
dispose
in interface Disposable
protected void doDispose()
public boolean isDisposed()
isDisposed
in interface Registry
public boolean isDisposing()
isDisposing
in interface Registry
public boolean isInitialised()
isInitialised
in interface Registry
public boolean isInitialising()
isInitialising
in interface Registry
public final void initialise() throws InitialisationException
Initialisable
InitialisationException
should be thrown,
causing the Mule instance to shutdown. If the error is recoverable, say by
retrying to connect, a RecoverableException
should be thrown.
There is no guarantee that by throwing a Recoverable exception that the Mule
instance will not shut down.
initialise
in interface Initialisable
InitialisationException
- if a fatal error occurs causing the Mule instance to shutdown
RecoverableException
- if an error occurs that can be recovered fromprotected void doInitialise() throws InitialisationException
InitialisationException
public Connector lookupConnector(String name)
lookupConnector
in interface Registry
public ImmutableEndpoint lookupEndpoint(String name)
Registry
API as it should only be used
internally and may confuse users. The EndpointFactory
should be used
for creating endpoints.
name
- the idendtifer/name used to register endpoint in registry#lookupInboundEndpoint(String, org.mule.api.MuleContext)
,
#lookupResponseEndpoint(String, org.mule.api.MuleContext)
public EndpointBuilder lookupEndpointBuilder(String name)
Registry
lookupEndpointBuilder
in interface Registry
public EndpointFactory lookupEndpointFactory()
lookupEndpointFactory
in interface Registry
public Transformer lookupTransformer(String name)
lookupTransformer
in interface Registry
public Transformer lookupTransformer(Class inputType, Class outputType) throws TransformerException
lookupTransformer
in interface Registry
inputType
- The desiered input type for the transformeroutputType
- the desired output type for the transformer
TransformerException
- will be thrown if there is more than one matchprotected Transformer getNearestTransformerMatch(List trans, Class input, Class output) throws TransformerException
TransformerException
public List lookupTransformers(Class input, Class output)
Transformer
objects that accept the given
input and return the given output type of object
lookupTransformers
in interface Registry
input
- The desiered input type for the transformeroutput
- the desired output type for the transformer
public Model lookupModel(String name)
lookupModel
in interface Registry
public Model lookupSystemModel()
lookupSystemModel
in interface Registry
public Collection getModels()
getModels
in interface Registry
public Collection getConnectors()
getConnectors
in interface Registry
public Collection getAgents()
getAgents
in interface Registry
public Collection getEndpoints()
getEndpoints
in interface Registry
public Collection getTransformers()
getTransformers
in interface Registry
public Agent lookupAgent(String name)
lookupAgent
in interface Registry
public Service lookupService(String name)
lookupService
in interface Registry
public Collection lookupServices()
lookupServices
in interface Registry
public Collection lookupServices(String model)
lookupServices
in interface Registry
public final Object lookupObject(String key, int scope)
Registry
lookupObject
in interface Registry
public final Object lookupObject(Class type) throws RegistrationException
Registry
lookupObject
in interface Registry
RegistrationException
public final Object lookupObject(Class type, int scope) throws RegistrationException
lookupObject
in interface Registry
RegistrationException
- if more than one object is foundpublic final Collection lookupObjects(Class type)
Registry
lookupObjects
in interface Registry
public final Collection lookupObjects(Class type, int scope)
Registry
lookupObjects
in interface Registry
protected abstract Collection doLookupObjects(Class type)
public Object lookupObject(String key)
Registry
lookupObject
in interface Registry
protected abstract Object doLookupObject(String key)
protected void unsupportedOperation(String operation, Object o) throws UnsupportedOperationException
UnsupportedOperationException
public final void registerObject(String key, Object value) throws RegistrationException
registerObject
in interface Registry
RegistrationException
public final void registerObject(String key, Object value, Object metadata) throws RegistrationException
registerObject
in interface Registry
RegistrationException
protected abstract void doRegisterObject(String key, Object value, Object metadata) throws RegistrationException
RegistrationException
public final void registerTransformer(Transformer transformer) throws MuleException
registerTransformer
in interface Registry
MuleException
protected abstract void doRegisterTransformer(Transformer transformer) throws MuleException
MuleException
public final String getRegistryId()
getRegistryId
in interface Registry
public Registry getParent()
getParent
in interface Registry
public void setParent(Registry registry)
setParent
in interface Registry
public int getDefaultScope()
getDefaultScope
in interface Registry
public void setDefaultScope(int scope)
setDefaultScope
in interface Registry
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |