org.oddjob
Class OddjobComponentResolver
java.lang.Object
org.oddjob.OddjobComponentResolver
- All Implemented Interfaces:
- ComponentProxyResolver
public class OddjobComponentResolver
- extends Object
- implements ComponentProxyResolver
Possibly provide a proxy to use as the component. The proxy will provide
State, Icon information etc for simple components.
The logic here is quite simple:
- If the component is
Stateful
it is used as is.
- If the component is
Runnable
it is proxied.
- If the component provides a service like interface it is proxied.
- Otherwise it is used as is.
- Author:
- Rob Gordon.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OddjobComponentResolver
public OddjobComponentResolver()
resolve
public Object resolve(Object component,
ArooaSession session)
- Description copied from interface:
ComponentProxyResolver
- Possibly create a proxy for a given component.
- Specified by:
resolve
in interface ComponentProxyResolver
- Parameters:
component
- The object to possibly proxy.session
- A session.
- Returns:
- The proxy, or the original object.
restore
public Object restore(Object proxy,
ArooaSession session)
- Description copied from interface:
ComponentProxyResolver
- Restore what is possibly a proxy to provide the original component.
- Specified by:
restore
in interface ComponentProxyResolver
- Parameters:
proxy
- Possbily the proxy.session
- A session.
- Returns:
- The component being proxied.