org.araneaframework.core
Class BaseService

java.lang.Object
  extended by org.araneaframework.core.BaseComponent
      extended by org.araneaframework.core.BaseService
All Implemented Interfaces:
Serializable, Component, Service
Direct Known Subclasses:
BaseApplicationService, BaseFilterService, BaseServiceRouterService, BaseWidget, RelocatableDecorator, SimpleCriticalErrorHandlerService, StandardHttpSessionRouterService, WindowClosingService

public class BaseService
extends BaseComponent
implements Service

Non-composite service component providing the extra action(Path, InputData, OutputData) to BaseComponent.

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

Nested Class Summary
protected  class 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
protected  InputData currentInputData
           
protected  OutputData currentOutputData
           
 
Constructor Summary
BaseService()
           
 
Method Summary
 Service.Interface _getService()
          Provides access to the request handler.
protected  void action(Path path, InputData input, OutputData output)
          Services provide their services through the action(...) method.
protected  InputData getInputData()
          Provides access to the current request data.
protected  OutputData getOutputData()
          Provides access to the current response data.
protected  void handleServiceException(Exception e)
          A method for Service-specific exception handling.
 
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, destroy, disable, enable, getEnvironment, getScope, handleException, init, isAlive, isDead, isInitialized, propagate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.araneaframework.Component
_getComponent, getEnvironment, getScope, isAlive
 

Field Detail

currentInputData

protected transient InputData currentInputData

currentOutputData

protected transient OutputData currentOutputData
Constructor Detail

BaseService

public BaseService()
Method Detail

_getService

public Service.Interface _getService()
Description copied from interface: Service
Provides access to the request handler.

Specified by:
_getService in interface Service
Returns:
An implementation of the interface that handles requests.

action

protected void action(Path path,
                      InputData input,
                      OutputData output)
               throws Exception
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.

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.

handleServiceException

protected void handleServiceException(Exception e)
                               throws Exception
A method for Service-specific exception handling.

Parameters:
e - An exception that ha occured.
Throws:
Exception - Any exception that may occur during exception handling.

getInputData

protected InputData getInputData()
Provides access to the current request data.

Returns:
The current request data.

getOutputData

protected OutputData getOutputData()
Provides access to the current response data.

Returns:
The current response data.