|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pt.digitalis.dif.controller.AbstractChAL<RequestType,ResponseType>
RequestType
- type original request typeResponseType
- the original response typepublic abstract class AbstractChAL<RequestType,ResponseType>
Base implementation for all ChALs The API exposed to the Listener entities is the serve()
method. All
the communication between AbstractChAL and Listener is done through this API.
Field Summary | |
---|---|
protected IMessageManager |
messageManager
The message manager. |
Constructor Summary | |
---|---|
AbstractChAL()
|
Method Summary | |
---|---|
String |
getChannelID()
Get the id of the channel associated to the ChAL. |
protected abstract ClientDescriptor |
getClientDescriptor(RequestType originalRequest)
Creates a client descriptor object identifying the client agent who issued the request |
protected IDIFDispatcher |
getDispatcher()
Inspector of the dispatcher assigned to this channel. |
protected IDispatcherErrorHandler |
getErrorHandler()
Inspector of the dispatcher assigned to this channel. |
IDIFResponse |
serve(RequestType originalRequest,
ResponseType finalResponse,
RESTAction restAction)
This method will be called by the client via Listener. |
protected abstract boolean |
validateRequest(RequestType originalRequest)
Validates the original request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface pt.digitalis.dif.controller.interfaces.IChAL |
---|
publish, translateRequest |
Field Detail |
---|
protected IMessageManager messageManager
Constructor Detail |
---|
public AbstractChAL()
Method Detail |
---|
public String getChannelID()
Channel
annotationprotected abstract ClientDescriptor getClientDescriptor(RequestType originalRequest) throws ControllerException
originalRequest
- the original request object
ControllerException
- when any runtime exception is thrownprotected IDIFDispatcher getDispatcher()
protected IDispatcherErrorHandler getErrorHandler()
public IDIFResponse serve(RequestType originalRequest, ResponseType finalResponse, RESTAction restAction)
IChAL
serve
in interface IChAL<RequestType,ResponseType>
originalRequest
- the original request objectfinalResponse
- the final response objectrestAction
- the REST action, if specified
IChAL.serve(java.lang.Object, java.lang.Object,
pt.digitalis.dif.controller.objects.RESTAction)
protected abstract boolean validateRequest(RequestType originalRequest) throws ControllerException
originalRequest
- The original request received from the client.
ControllerException
- when any runtime exception is thrown
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |