org.araneaframework.framework.container
Class StandardContainerService

java.lang.Object
  extended by org.araneaframework.core.BaseComponent
      extended by org.araneaframework.core.BaseService
          extended by org.araneaframework.framework.core.BaseFilterService
              extended by org.araneaframework.framework.container.StandardContainerService
All Implemented Interfaces:
Serializable, Component, FilterService, Service
Direct Known Subclasses:
PathInfoServiceContainerService

public class StandardContainerService
extends BaseFilterService

A service that contains a service and routes actions to it. If hasAction(InputData) returns true, the action is routed to the child, otherwise not.

Author:
"Toomas Römer"
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.araneaframework.core.BaseService
BaseService.ServiceImpl
 
Nested classes/interfaces inherited from class org.araneaframework.core.BaseComponent
BaseComponent.ComponentImpl
 
Nested classes/interfaces inherited from interface org.araneaframework.Service
Service.Interface
 
Field Summary
static String ACTION_PATH_INPUT_DATA_PARAMETER
          The key of the action path parameter in the request.
 
Fields inherited from class org.araneaframework.framework.core.BaseFilterService
childService
 
Fields inherited from class org.araneaframework.core.BaseService
currentInputData, currentOutputData
 
Constructor Summary
StandardContainerService()
           
 
Method Summary
protected  void action(Path path, InputData input, OutputData output)
          Services provide their services through the action(...) method.
protected  Path getActionPath(InputData input)
          Returns the path of action from the InputData.
protected  boolean hasAction(InputData input)
          Determines if the request contains an action.
 
Methods inherited from class org.araneaframework.framework.core.BaseFilterService
destroy, getChildEnvironment, init, propagate, setChildService
 
Methods inherited from class org.araneaframework.core.BaseService
_getService, getInputData, getOutputData, handleServiceException
 
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
 
Methods inherited from interface org.araneaframework.Service
_getService
 
Methods inherited from interface org.araneaframework.Component
_getComponent, getEnvironment, getScope, isAlive
 

Field Detail

ACTION_PATH_INPUT_DATA_PARAMETER

public static final String ACTION_PATH_INPUT_DATA_PARAMETER
The key of the action path parameter in the request.

See Also:
Constant Field Values
Constructor Detail

StandardContainerService

public StandardContainerService()
Method Detail

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.


hasAction

protected boolean hasAction(InputData input)
Determines if the request contains an action. Checks if the ACTION_PATH_INPUT_DATA_PARAMETER is set in the request.


action

protected void action(Path path,
                      InputData input,
                      OutputData output)
               throws Exception
Description copied from class: BaseService
Services provide their services through the action(...) method. An implementation of a non-composite service like BaseService uses the action method to hook in the middle of the action routing and provide filtering, logging etc.

Overrides:
action in class BaseFilterService
Parameters:
path - The path of the component to whom the action is targeted.
input - The request data.
output - The response data.
Throws:
Exception - Any runtime exception that may occur.