org.mule.processor
Class AbstractMuleObjectOwner<T>

java.lang.Object
  extended by org.mule.processor.AbstractMuleObjectOwner<T>
All Implemented Interfaces:
FlowConstructAware, MuleContextAware, Disposable, Initialisable, Lifecycle, Startable, Stoppable
Direct Known Subclasses:
AbstractMessageProcessorOwner, ChoiceMessagingExceptionStrategy, MessagingExceptionStrategyAcceptorDelegate

public abstract class AbstractMuleObjectOwner<T>
extends Object
implements Lifecycle, MuleContextAware, FlowConstructAware

An object that owns Mule objects and delegates startup/shutdown events to them.


Field Summary
protected  FlowConstruct flowConstruct
           
protected  MuleContext muleContext
           
 
Fields inherited from interface org.mule.api.lifecycle.Initialisable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Stoppable
PHASE_NAME
 
Fields inherited from interface org.mule.api.lifecycle.Disposable
PHASE_NAME
 
Constructor Summary
AbstractMuleObjectOwner()
           
 
Method Summary
 void dispose()
          A lifecycle method where implementor should free up any resources.
 FlowConstruct getFlowConstruct()
           
 MuleContext getMuleContext()
           
protected abstract  List<T> getOwnedObjects()
           
 void initialise()
          Method used to perform any initialisation work.
 void setFlowConstruct(FlowConstruct flowConstruct)
           
 void setMuleContext(MuleContext context)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

muleContext

protected MuleContext muleContext

flowConstruct

protected FlowConstruct flowConstruct
Constructor Detail

AbstractMuleObjectOwner

public AbstractMuleObjectOwner()
Method Detail

setMuleContext

public void setMuleContext(MuleContext context)
Specified by:
setMuleContext in interface MuleContextAware

setFlowConstruct

public void setFlowConstruct(FlowConstruct flowConstruct)
Specified by:
setFlowConstruct in interface FlowConstructAware

getMuleContext

public MuleContext getMuleContext()

getFlowConstruct

public FlowConstruct getFlowConstruct()

initialise

public void initialise()
                throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an 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.

Specified by:
initialise in interface Initialisable
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown
RecoverableException - if an error occurs that can be recovered from

dispose

public void dispose()
Description copied from interface: Disposable
A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

Specified by:
dispose in interface Disposable

start

public void start()
           throws MuleException
Specified by:
start in interface Startable
Throws:
MuleException

stop

public void stop()
          throws MuleException
Specified by:
stop in interface Stoppable
Throws:
MuleException

getOwnedObjects

protected abstract List<T> getOwnedObjects()


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.