org.oddjob.framework
Class BaseWrapper
java.lang.Object
org.oddjob.framework.BaseComponent
org.oddjob.framework.BaseWrapper
- All Implemented Interfaces:
- Runnable, org.apache.commons.beanutils.DynaBean, ArooaContextAware, PropertyChangeNotifier, Iconic, LogEnabled, Resetable, Stateful, Stoppable
- Direct Known Subclasses:
- RunnableWrapper, ServiceWrapper
public abstract class BaseWrapper
- extends BaseComponent
- implements Runnable, Stateful, Resetable, org.apache.commons.beanutils.DynaBean, Stoppable, LogEnabled
Base class for proxy creators.
| Methods inherited from class org.oddjob.framework.BaseComponent |
addIconListener, addPropertyChangeListener, addStateListener, configure, destroy, fireDestroyedState, firePropertyChange, getArooaSession, iconForId, initialise, lastStateEvent, onConfigured, onInitialised, removeIconListener, removePropertyChangeListener, removeStateListener, save, setArooaContext, setArooaSession, stateHandler |
| Methods inherited from interface java.lang.Runnable |
run |
BaseWrapper
public BaseWrapper()
getWrapped
public abstract Object getWrapped()
- Return the object that is being proxied.
- Returns:
- The component being proxied.
getDynaBean
protected abstract org.apache.commons.beanutils.DynaBean getDynaBean()
- Returns:
getProxy
protected abstract Object getProxy()
logger
protected org.apache.log4j.Logger logger()
- Specified by:
logger in class BaseComponent
loggerName
public String loggerName()
- Specified by:
loggerName in interface LogEnabled
configure
protected void configure()
throws ArooaConfigurationException
- Throws:
ArooaConfigurationException
save
protected void save()
throws ComponentPersistException
- Description copied from class:
BaseComponent
- Implementations override this to save their state on state
change.
- Overrides:
save in class BaseComponent
- Throws:
ComponentPersistException
equals
public boolean equals(Object other)
- Overrides:
equals in class Object
toString
public String toString()
- Overrides:
toString in class Object
contains
public boolean contains(String name,
String key)
- Specified by:
contains in interface org.apache.commons.beanutils.DynaBean
get
public Object get(String name)
- Specified by:
get in interface org.apache.commons.beanutils.DynaBean
get
public Object get(String name,
int index)
- Specified by:
get in interface org.apache.commons.beanutils.DynaBean
get
public Object get(String name,
String key)
- Specified by:
get in interface org.apache.commons.beanutils.DynaBean
getDynaClass
public org.apache.commons.beanutils.DynaClass getDynaClass()
- Specified by:
getDynaClass in interface org.apache.commons.beanutils.DynaBean
remove
public void remove(String name,
String key)
- Specified by:
remove in interface org.apache.commons.beanutils.DynaBean
set
public void set(String name,
int index,
Object value)
- Specified by:
set in interface org.apache.commons.beanutils.DynaBean
set
public void set(String name,
Object value)
- Specified by:
set in interface org.apache.commons.beanutils.DynaBean
set
public void set(String name,
String key,
Object value)
- Specified by:
set in interface org.apache.commons.beanutils.DynaBean
stop
public final void stop()
throws FailedToStopException
- Description copied from interface:
Stoppable
- Stop executing. This method should not return until the
Stoppable has actually stopped.
- Specified by:
stop in interface Stoppable
- Throws:
FailedToStopException
onStop
protected void onStop()
throws FailedToStopException
- Throws:
FailedToStopException
getResult
protected int getResult(Object callableResult)
throws ArooaPropertyException,
ArooaConversionException
- Get the result. Use either the return value from the Callable or
the result property if there is one.
- Returns:
-
- Throws:
ArooaConversionException
ArooaPropertyException
onDestroy
public void onDestroy()
- Description copied from class:
BaseComponent
- Subclasses override this method to clear up resources.
- Overrides:
onDestroy in class BaseComponent
interfacesFor
public static Class<?>[] interfacesFor(Object object)