java.lang.Object
net.i2p.client.impl.HandlerImpl
net.i2p.client.impl.MessagePayloadMessageHandler
- All Implemented Interfaces:
I2CPMessageHandler
Handle I2CP MessagePayloadMessages from the router delivering the contents of a message by accepting it, decrypting the payload, adding it to the set of received messages, and telling the router that it has been received correctly.
We don't really decrypt (no more end-to-end crypto).
Field Summary
Fields inherited from class HandlerImpl
_context, _logModifier and TypeFieldDescriptionprotected final I2PAppContextThe application context.protected final LogThe logger.Constructor Summary
ConstructorsConstructorDescriptionCreate the handler for I2CP message payload messages.Method Summary
Modifier and TypeMethodDescriptionprivate PayloaddecryptPayload(MessagePayloadMessage msg, I2PSessionImpl session) Decrypt the payloadvoidhandleMessage(I2CPMessage message, I2PSessionImpl session) Handle an incoming I2CP message.Methods inherited from class HandlerImpl
getType
Constructor Details
MessagePayloadMessageHandler
Create the handler for I2CP message payload messages.- Parameters:
context- the application context, whose log manager supplies the handler logger
Method Details
handleMessage
Handle an incoming I2CP message.- Parameters:
message- the incoming I2CP message, expected to be a MessagePayloadMessagesession- the session the payload belongs to, which collects the message
decryptPayload
Decrypt the payloadWe don't really decrypt (no more end-to-end crypto) If we do, we need to use the correct key manager in the decrypt() call below.
- Parameters:
msg- the message carrying the payloadsession- unused, kept for the end-to-end crypto that was removed- Returns:
- the payload with its encrypted data copied to the unencrypted data