|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
RequestType
- the type of request of the specific AbstractChALResponseType
- the type of response of the specific AbstractChALpublic interface IChAL<RequestType,ResponseType>
AbstractChAL stands for Channel Abstraction Layer and as the name implies it's purpose is to
insulate the framework from the transport channel used by the original request. As can be implied from the statement
above, AbstractChAL should be tailored to take care of a specific transport channel details. As such, AbstractChAL
should be extended using inheritance and is the subclass that should be instantiated. To enforce the subclass
instantiation AbstractChAL is declared abstract
. AbstractChAL is responsible for translating the
original request into a format that the framework can understand, then executing the appropriated Dispatcher and
finally publish the results.
Method Summary | |
---|---|
void |
publish(IDIFResponse difResponse,
RequestType originalRequest,
ResponseType finalResponse)
This method is responsible for the response translation from the framework internal format into the channel's own format. |
IDIFResponse |
serve(RequestType originalRequest,
ResponseType finalResponse,
RESTAction action)
This method will be called by the client via Listener. |
IDIFRequest |
translateRequest(RequestType originalRequest)
This method should receive the request from the Listener and translate it to a format understandable by the framework. |
Method Detail |
---|
void publish(IDIFResponse difResponse, RequestType originalRequest, ResponseType finalResponse)
difResponse
- the framework's responseoriginalRequest
- the original requestfinalResponse
- the response to send back to the ListenerIDIFResponse serve(RequestType originalRequest, ResponseType finalResponse, RESTAction action)
originalRequest
- the original request made by the clientfinalResponse
- the response object passed by the Listener and that will be sent backaction
- the REST action if specified
IDIFRequest translateRequest(RequestType originalRequest) throws ControllerException
originalRequest
- The request received from the Listener
ControllerException
- when any runtime exception is thrown
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |