Cumulus4j API
(1.0.0)

org.cumulus4j.keymanager.back.shared
Class GetActiveEncryptionKeyResponse

java.lang.Object
  extended by org.cumulus4j.keymanager.back.shared.Message
      extended by org.cumulus4j.keymanager.back.shared.Response
          extended by org.cumulus4j.keymanager.back.shared.GetKeyResponse
              extended by org.cumulus4j.keymanager.back.shared.GetActiveEncryptionKeyResponse
All Implemented Interfaces:
Serializable

public class GetActiveEncryptionKeyResponse
extends GetKeyResponse

Response implementation to send the currently active encryption key to the app-server. It is the response to a GetActiveEncryptionKeyRequest.

Author:
Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de
See Also:
GetActiveEncryptionKeyRequest, Serialized Form

Constructor Summary
GetActiveEncryptionKeyResponse()
          Create an empty instance of GetActiveEncryptionKeyResponse.
GetActiveEncryptionKeyResponse(Request request, long keyID, byte[] keyEncodedEncrypted, Date activeUntilExcl)
          Create an instance of GetActiveEncryptionKeyResponse in order to reply the given request.
 
Method Summary
 Date getActiveUntilExcl()
          Get the moment in time until (excluding) which the key transported by this response should be used for encryption.
 void setActiveUntilExcl(Date activeUntilExcl)
          Set the moment in time until (excluding) which the key transported by this response should be used for encryption.
 
Methods inherited from class org.cumulus4j.keymanager.back.shared.GetKeyResponse
getKeyEncodedEncrypted, getKeyID, setKeyEncodedEncrypted, setKeyID
 
Methods inherited from class org.cumulus4j.keymanager.back.shared.Response
toString
 
Methods inherited from class org.cumulus4j.keymanager.back.shared.Message
equals, getRequestID, hashCode, setRequestID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GetActiveEncryptionKeyResponse

public GetActiveEncryptionKeyResponse()
Create an empty instance of GetActiveEncryptionKeyResponse. Only used for serialisation/deserialisation.


GetActiveEncryptionKeyResponse

public GetActiveEncryptionKeyResponse(Request request,
                                      long keyID,
                                      byte[] keyEncodedEncrypted,
                                      Date activeUntilExcl)
Create an instance of GetActiveEncryptionKeyResponse in order to reply the given request.

Parameters:
request - the request to be replied (an instance of GetActiveEncryptionKeyRequest).
keyID - the identifier of the key to be sent to the app-server.
keyEncodedEncrypted - the encrypted symmetric secret key.
activeUntilExcl - the timestamp until which this key should be used for encryption. As soon as this timestamp is reached, the app-server should again send a GetActiveEncryptionKeyRequest to the key-manager.
Method Detail

getActiveUntilExcl

public Date getActiveUntilExcl()
Get the moment in time until (excluding) which the key transported by this response should be used for encryption. After this timestamp (or more precisely when it is reached), the app-server should request it again.

Returns:
the moment in time until which the key transported by this response should be used for encryption.
See Also:
setActiveUntilExcl(Date)

setActiveUntilExcl

public void setActiveUntilExcl(Date activeUntilExcl)
Set the moment in time until (excluding) which the key transported by this response should be used for encryption.

Parameters:
activeUntilExcl - the moment in time until which the key transported by this response should be used for encryption.
See Also:
getActiveUntilExcl()

Cumulus4j API
(1.0.0)

Copyright © 2012 NightLabs Consulting GmbH. All Rights Reserved.