public abstract class AbstractGlob<Payload extends FastSerializable> extends java.lang.Object implements FastSerializable
Modifier | Constructor and Description |
---|---|
protected |
AbstractGlob(java.io.DataInput in)
Deserializer.
|
protected |
AbstractGlob(Label label,
java.security.PrivateKey signingKey,
Payload payload) |
Modifier and Type | Method and Description |
---|---|
Payload |
decrypt() |
protected abstract Payload |
deserializePayload(java.io.DataInput in)
Deserializes a payload object from the given input.
|
long |
getTimestamp() |
boolean |
isOlderThan(AbstractGlob<?> glob)
Whether this Glob is older than the given Glob.
|
abstract boolean |
updateCache(Cache dissemCache,
RemoteStore store,
long onum)
Updates the worker and dissemination caches with this glob.
|
protected abstract void |
verifyNoSignatureRequired(Payload payload)
Verifies that the given payload does not require a signature.
|
void |
verifySignature(java.security.PublicKey key) |
void |
write(java.io.DataOutput out)
Serializer.
|
protected AbstractGlob(Label label, java.security.PrivateKey signingKey, Payload payload)
label
- the label at which this glob is protected.signingKey
- the key with which to sign the payload.payload
- the payload to be encrypted.protected AbstractGlob(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public boolean isOlderThan(AbstractGlob<?> glob)
public void verifySignature(java.security.PublicKey key) throws java.security.SignatureException, java.security.InvalidKeyException
java.security.SignatureException
java.security.InvalidKeyException
protected abstract void verifyNoSignatureRequired(Payload payload) throws java.security.SignatureException
java.security.SignatureException
- if the payload requires a signature.public void write(java.io.DataOutput out) throws java.io.IOException
write
in interface FastSerializable
java.io.IOException
public Payload decrypt()
protected abstract Payload deserializePayload(java.io.DataInput in) throws java.io.IOException
java.io.IOException
public long getTimestamp()
public abstract boolean updateCache(Cache dissemCache, RemoteStore store, long onum)