| 
 | Cumulus4j API (1.2.0-SNAPSHOT) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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
AbstractMessageBrokerAbstractMessageBroker.query(Class, Request) method. Subclasses should implement this method instead of query(...).
_query in class AbstractMessageBrokerresponseClass - 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
ErrorResponseExceptionprotected Request _pollRequest(String cryptoSessionIDPrefix)
AbstractMessageBrokerAbstractMessageBroker.pollRequest(String) method. Subclasses should implement this method instead of pollRequest(...).
_pollRequest in class AbstractMessageBrokercryptoSessionIDPrefix - 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)
AbstractMessageBrokerAbstractMessageBroker.pushResponse(Response) method. Subclasses should implement this method instead of pushResponse(...).
_pushResponse in class AbstractMessageBrokerresponse - the response answering a previous Request enqueued by AbstractMessageBroker.query(Class, Request).| 
 | Cumulus4j API (1.2.0-SNAPSHOT) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||