public abstract class KeyExchange extends Protocol
ASYM_ENCRYPT
.Modifier and Type | Field and Description |
---|---|
protected Address |
local_addr |
after_creation_hook, down_prot, ergonomics, id, log, name, stack, stats, up_prot
Constructor and Description |
---|
KeyExchange() |
Modifier and Type | Method and Description |
---|---|
Object |
down(Event evt)
An event is to be sent down the stack.
|
abstract void |
fetchSecretKeyFrom(Address target)
Needs to fetch the secret key from a given destination (usually the key server).
|
protected <T extends Protocol> |
findProtocolAbove(Class<? extends Protocol> clazz) |
protected Tuple<SecretKey,byte[]> |
getSecretKeyFromAbove()
Fetches the secret key from a protocol above us
|
protected void |
handleView(View view) |
List<Integer> |
providedUpServices()
List of events that are provided to layers above (they will be handled when sent down from above)
|
List<Integer> |
requiredUpServices()
List of events that are required to be answered by some layer above
|
protected void |
setSecretKeyAbove(Tuple<SecretKey,byte[]> key)
Sets the secret key in a protocol above us
|
accept, afterCreationHook, destroy, dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, init, isErgonomics, level, parse, printStats, providedDownServices, requiredDownServices, resetStatistics, resetStats, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, start, statsEnabled, stop, up, up
protected Address local_addr
public List<Integer> providedUpServices()
Protocol
providedUpServices
in class Protocol
public List<Integer> requiredUpServices()
Protocol
requiredUpServices
in class Protocol
public abstract void fetchSecretKeyFrom(Address target) throws Exception
setSecretKeyAbove(Tuple)
.target
- The member from which to fetch the secret keyException
public Object down(Event evt)
Protocol
down_prot.down()
. In case of a GET_ADDRESS event (which tries to
retrieve the stack's address from one of the bottom layers), the layer may need to send
a new response event back up the stack using up_prot.up()
.protected void handleView(View view)
protected Tuple<SecretKey,byte[]> getSecretKeyFromAbove()
protected void setSecretKeyAbove(Tuple<SecretKey,byte[]> key)
key
- The secret key and its versionCopyright © 2018 JBoss, a division of Red Hat. All rights reserved.