org.araneaframework.framework.container
Class StandardServiceAdapterWidget
java.lang.Object
org.araneaframework.core.BaseComponent
org.araneaframework.core.BaseService
org.araneaframework.core.BaseWidget
org.araneaframework.framework.container.StandardServiceAdapterWidget
- All Implemented Interfaces:
- Component, Serializable, Service, Widget
- public class StandardServiceAdapterWidget
- extends BaseWidget
A widget that contains a child service. Calls the service's action only if it gets
an event.
- Author:
- "Toomas Römer"
- See Also:
- Serialized Form
| Methods inherited from class org.araneaframework.core.BaseComponent |
_addComponent, _addComponent, _checkCall, _disableComponent, _enableComponent, _endCall, _endWaitingCall, _getChildren, _getComponent, _getDisabledChildren, _propagate, _relocateComponent, _removeComponent, _setEnvironment, _setScope, _startCall, _startWaitingCall, _strictCheckCall, _strictStartCall, _waitNoCall, disable, enable, getEnvironment, getScope, handleException, isAlive, isDead, isInitialized |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ACTION_PATH_INPUT_DATA_PARAMETER
public static final String ACTION_PATH_INPUT_DATA_PARAMETER
- See Also:
- Constant Field Values
StandardServiceAdapterWidget
public StandardServiceAdapterWidget()
setChildService
public void setChildService(Service service)
- Set the child service.
init
protected void init()
throws Exception
- Description copied from class:
BaseComponent
- Init callback. Gets called when the component is initilized.
- Overrides:
init in class BaseComponent
- Throws:
Exception - Any runtime exception that may occur.
getActionPath
protected Path getActionPath(InputData input)
- Returns the path of action from the InputData. Uses the
ACTION_PATH_INPUT_DATA_PARAMETER to get the path.
update
public void update(InputData input)
- Overrides:
update in class BaseWidget
propagate
protected void propagate(Message message)
throws Exception
- Description copied from class:
BaseComponent
- Forwards the
message to the component and to all of its
children components.
- Overrides:
propagate in class BaseComponent
- Parameters:
message - A message to forward.
- Throws:
Exception - Any runtime exception that may occur.
event
public void event(Path path,
InputData input)
- Overrides:
event in class BaseWidget
render
public void render(OutputData output)
throws Exception
- Calls child service's action only if an event was received. The action path
is constructed via
getActionPath(InputData). The InputData is
saved in the update(InputData) method.
TODO: why is it in render and not in event() ?
- Overrides:
render in class BaseWidget
- Throws:
Exception
destroy
protected void destroy()
throws Exception
- Description copied from class:
BaseComponent
- Destroy callback. Gets called when the component is destroyed.
- Overrides:
destroy in class BaseComponent
- Throws:
Exception - Any runtime exception that may occur.