|
Cumulus4j API (1.1.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cumulus4j.store.crypto.keymanager.messagebroker.AbstractMessageBroker org.cumulus4j.store.crypto.keymanager.messagebroker.inmemory.MessageBrokerInMemory
public class MessageBrokerInMemory
Implementation of MessageBroker
which
works only in a single JVM. It manages all messages in-memory.
Important: This implementation can usually not be used in a cluster! It is only cluster-able, if you use transparent JVM-clustering, e.g. with Terracotta!
Field Summary |
---|
Fields inherited from interface org.cumulus4j.store.crypto.keymanager.messagebroker.MessageBroker |
---|
SYSTEM_PROPERTY_POLL_REQUEST_TIMEOUT, SYSTEM_PROPERTY_QUERY_TIMEOUT |
Constructor Summary | |
---|---|
MessageBrokerInMemory()
|
Method Summary | |
---|---|
protected Request |
_pollRequest(String cryptoSessionIDPrefix)
Delegate of the AbstractMessageBroker.pollRequest(String) method. |
protected Request |
_pollRequest(String cryptoSessionIDPrefix,
long pollRequestTimeout)
|
protected void |
_pushResponse(Response response)
Delegate of the AbstractMessageBroker.pushResponse(Response) method. |
protected Response |
_query(Class<? extends Response> responseClass,
Request request)
Delegate of the AbstractMessageBroker.query(Class, Request) method. |
protected Response |
_query(Class<? extends Response> responseClass,
Request request,
long queryTimeout)
|
Methods inherited from class org.cumulus4j.store.crypto.keymanager.messagebroker.AbstractMessageBroker |
---|
getPollRequestTimeout, getQueryTimeout, pollRequest, pushResponse, query |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageBrokerInMemory()
Method Detail |
---|
protected Response _query(Class<? extends Response> responseClass, Request request) throws TimeoutException, ErrorResponseException
AbstractMessageBroker
AbstractMessageBroker.query(Class, Request)
method. Subclasses should implement this method instead of query(...)
.
_query
in class AbstractMessageBroker
responseClass
- the type of the expected response; can be null, if you expect to receive null (i.e. you pass a "void" request).request
- the request to be sent to the key-manager.
null
, if the key-manager replied with a NullResponse
.
TimeoutException
- if the request was not replied within the query-timeout
.
ErrorResponseException
- if the key-manager (either running embedded on the remote client or
in a separate key-server) sent an ErrorResponse
.protected Response _query(Class<? extends Response> responseClass, Request request, long queryTimeout) throws TimeoutException, ErrorResponseException
TimeoutException
ErrorResponseException
protected Request _pollRequest(String cryptoSessionIDPrefix)
AbstractMessageBroker
AbstractMessageBroker.pollRequest(String)
method. Subclasses should implement this method instead of pollRequest(...)
.
_pollRequest
in class AbstractMessageBroker
cryptoSessionIDPrefix
- usually, every key-manager uses the same prefix for
all crypto-sessions. Thus, this prefix is used to efficiently route requests to
the right key-manager.
cryptoSessionIDPrefix
or null
, if no such request pops up in the to-do-queue within the timeout.protected Request _pollRequest(String cryptoSessionIDPrefix, long pollRequestTimeout)
protected void _pushResponse(Response response)
AbstractMessageBroker
AbstractMessageBroker.pushResponse(Response)
method. Subclasses should implement this method instead of pushResponse(...)
.
_pushResponse
in class AbstractMessageBroker
response
- the response answering a previous Request
enqueued by AbstractMessageBroker.query(Class, Request)
.
|
Cumulus4j API (1.1.1) |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |