|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.object.JndiObjectFactory
public class JndiObjectFactory
Field Summary | |
---|---|
protected Log |
logger
|
Fields inherited from interface org.mule.api.lifecycle.Initialisable |
---|
PHASE_NAME |
Fields inherited from interface org.mule.api.lifecycle.Disposable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
JndiObjectFactory()
|
|
JndiObjectFactory(String objectName,
String initialFactory,
String url)
|
|
JndiObjectFactory(String objectName,
String initialFactory,
String url,
Map properties)
|
Method Summary | |
---|---|
void |
addObjectInitialisationCallback(InitialisationCallback callback)
Register a custom initialiser |
void |
dispose()
A lifecycle method where implementor should free up any resources. |
Context |
getContext()
|
String |
getInitialFactory()
|
Object |
getInstance(MuleContext muleContext)
Retrieve an instance of the object. |
Class<?> |
getObjectClass()
Returns the class of the object to be instantiated without actually creating an instance. |
String |
getObjectName()
|
Map |
getProperties()
|
String |
getUrl()
|
void |
initialise()
Method used to perform any initialisation work. |
boolean |
isAutoWireObject()
Return true if the created object should get its dependencies wired from the registry automatically. |
boolean |
isExternallyManagedLifecycle()
Returns true if Mule should not manage the life-cycle the object instance returned from the ObjectFactory. |
boolean |
isLookupOnEachCall()
|
boolean |
isSingleton()
Returns true if the ObjectFactory implementation always returns the same object instance. |
protected void |
setContext(Context context)
|
void |
setInitialFactory(String initialFactory)
|
void |
setLookupOnEachCall(boolean lookupOnEachCall)
|
void |
setObjectName(String objectName)
|
void |
setProperties(Map properties)
|
void |
setUrl(String url)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Log logger
Constructor Detail |
---|
public JndiObjectFactory()
public JndiObjectFactory(String objectName, String initialFactory, String url)
public JndiObjectFactory(String objectName, String initialFactory, String url, Map properties)
Method Detail |
---|
public 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 frompublic void dispose()
Disposable
dispose
in interface Disposable
public Object getInstance(MuleContext muleContext) throws Exception
ObjectFactory
getInstance
in interface ObjectFactory
muleContext
- the current MuleContext
instance. This can be used for performing registry look-ups
applying processors to newly created objects or even firing custom notifications
Exception
- if there is an exception thrown creating the new instancepublic Class<?> getObjectClass()
getObjectClass
in interface ObjectFactory
public String getInitialFactory()
public void setInitialFactory(String initialFactory)
public boolean isLookupOnEachCall()
public void setLookupOnEachCall(boolean lookupOnEachCall)
public String getObjectName()
public void setObjectName(String objectName)
public Map getProperties()
public void setProperties(Map properties)
public String getUrl()
public void setUrl(String url)
public Context getContext()
protected void setContext(Context context)
public void addObjectInitialisationCallback(InitialisationCallback callback)
ObjectFactory
addObjectInitialisationCallback
in interface ObjectFactory
public boolean isSingleton()
ObjectFactory
isSingleton
in interface ObjectFactory
public boolean isExternallyManagedLifecycle()
ObjectFactory
isExternallyManagedLifecycle
in interface ObjectFactory
public boolean isAutoWireObject()
ObjectFactory
isAutoWireObject
in interface ObjectFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |