Cumulus4j API
(1.2.0)

org.cumulus4j.store.crypto.keymanager.rest
Class KeyManagerChannelService

java.lang.Object
  extended by org.cumulus4j.store.crypto.keymanager.rest.KeyManagerChannelService

public class KeyManagerChannelService
extends Object

REST service for the communication channel between key-manager and app-server.

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de

Constructor Summary
KeyManagerChannelService()
           
 
Method Summary
 Request nextRequest(String cryptoSessionIDPrefix, Response response)
          Upload a Response and fetch the next Request.
 String testGet()
          Test method to allow an administrator to verify the URL in a browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyManagerChannelService

public KeyManagerChannelService()
Method Detail

testGet

public String testGet()
Test method to allow an administrator to verify the URL in a browser.

Returns:
a string beginning with "OK:".

nextRequest

public Request nextRequest(String cryptoSessionIDPrefix,
                           Response response)
Upload a Response and fetch the next Request. If there is no Response, yet, the key-manager must upload a NullResponse. This method forwards the response to MessageBroker.pushResponse(Response) and then polls the next request.

Parameters:
cryptoSessionIDPrefix - the prefix used by the key-manager, i.e. the unique identifier of the key-manager. This is used for efficient routing of requests, i.e. by MessageBroker.pollRequest(String).
response - the last response or an instance of NullResponse (without requestID) if there is no last request to be replied.
Returns:
the next polled request or null if none popped up before the timeout.

Cumulus4j API
(1.2.0)

Copyright © 2013 NightLabs Consulting GmbH. All Rights Reserved.