public abstract class Blender extends AbstractDaemon implements TransportReceiver, BlendingSender
Constructor and Description |
---|
Blender(BlendingReceiver receiver,
HeaderVerifier verifier) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
blendMessage(BlendingSpec target,
VortexMessage message)
This method is called by the router layer to blend a message.
|
abstract byte[] |
blendMessageToBytes(BlendingSpec target,
VortexMessage msg)
Blends a VortexMessage into the apropriate text.
|
abstract String |
getBlendingAddress()
Returns the address supported for blender.
|
TransportSender |
getTransportSender()
Gets the currently set transport layer.
|
HeaderVerifier |
getVerifier() |
BlendingReceiver |
setBlenderReceiver(BlendingReceiver receiver)
Sets the listening router layer.
|
IncomingMessageRouterListener |
setIncomingMessageListener(IncomingMessageRouterListener listener)
Sets the listener for incoming messages to the router listener.
|
TransportSender |
setTransportSender(TransportSender sender)
Sets the transport sending layer.
|
HeaderVerifier |
setVerifier(HeaderVerifier verifier)
Sets the header verifier of the accounting layer.
|
abstract VortexMessage |
unblendMessage(byte[] blendedMessage)
Extracts a vortexMessage from a blended message.
|
shutdownDaemon, startDaemon, stopDaemon
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
gotMessage
shutdownDaemon, startDaemon, stopDaemon
public Blender(BlendingReceiver receiver, HeaderVerifier verifier)
public IncomingMessageRouterListener setIncomingMessageListener(IncomingMessageRouterListener listener)
Sets the listener for incoming messages to the router listener.
listener
- the listening router layerpublic final HeaderVerifier getVerifier()
public final HeaderVerifier setVerifier(HeaderVerifier verifier)
Sets the header verifier of the accounting layer.
verifier
- the header verifier which is called upon incomming messagespublic final BlendingReceiver setBlenderReceiver(BlendingReceiver receiver)
Sets the listening router layer.
All future messages successfully extracted and authorized by the header verifyer are passed to this object.
receiver
- The listening router layerpublic final TransportSender setTransportSender(TransportSender sender)
Sets the transport sending layer.
All future messages successfully blended are passed to this object.
sender
- The listening transport layerpublic final TransportSender getTransportSender()
Gets the currently set transport layer.
public abstract boolean blendMessage(BlendingSpec target, VortexMessage message) throws IOException
This method is called by the router layer to blend a message.
blendMessage
in interface BlendingSender
message
- the message to be blendedIOException
public abstract String getBlendingAddress()
Returns the address supported for blender.
The address is specified by <transport><address>!<publickey>.
public abstract byte[] blendMessageToBytes(BlendingSpec target, VortexMessage msg)
Blends a VortexMessage into the apropriate text.
target
- the blending spec for the recipientmsg
- the message to be blendedpublic abstract VortexMessage unblendMessage(byte[] blendedMessage)
Extracts a vortexMessage from a blended message.
blendedMessage
- the blended messageCopyright © 2023. All rights reserved.