|
Cumulus4j API (1.1.0) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
R
- the request type for which this request handler is responsible.public interface RequestHandler<R extends Request>
Handler processing and replying requests coming from the application server.
The so-called "key manager channel" is - as shown in the document
Deployment scenarios - an
HTTP(S) connection from the key-manager to the application server with an inverse request-response-cycle.
This means, the application server sends a Request
,
the key manager handles it and then sends a Response
back.
For every Request
type (i.e. subclass), there's one implementation of RequestHandler
registered in the KeyManagerChannelManager
. For every incoming Request
, the
KeyManagerChannelManager
instantiates an appropriate RequestHandler
implementation,
initialises it (i.e. calls setKeyManagerChannelManager(KeyManagerChannelManager)
) and then calls
handle(Request)
.
If handling a request fails, an ErrorResponse
is sent to the server.
Important: You should not directly implement this interface but instead subclass AbstractRequestHandler
!
Method Summary | |
---|---|
KeyManagerChannelManager |
getKeyManagerChannelManager()
Get the KeyManagerChannelManager . |
Response |
handle(R request)
Handle the given request. |
void |
setKeyManagerChannelManager(KeyManagerChannelManager keyManagerChannelManager)
Set the KeyManagerChannelManager . |
Method Detail |
---|
KeyManagerChannelManager getKeyManagerChannelManager()
KeyManagerChannelManager
.
KeyManagerChannelManager
or null
, if it has not yet been set.void setKeyManagerChannelManager(KeyManagerChannelManager keyManagerChannelManager)
KeyManagerChannelManager
. This method is called by the KeyManagerChannelManager
after instantiating a new RequestHandler
instance and before invoking handle(Request)
.
keyManagerChannelManager
- the KeyManagerChannelManager
Response handle(R request) throws Throwable
request
- the request to be handled; never null
.
null
, which is sent
as NullResponse
to the server.
Throwable
|
Cumulus4j API (1.1.0) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |