public class SmtpBlender extends Blender
Constructor and Description |
---|
SmtpBlender(BlendingReceiver receiver,
HeaderVerifier verifier) |
Modifier and Type | Method and Description |
---|---|
boolean |
blendMessage(BlendingSpec target,
VortexMessage message)
This method is called by the router layer to blend a message.
|
byte[] |
blendMessageToBytes(BlendingSpec target,
VortexMessage msg)
Blends a VortexMessage into the apropriate text.
|
String |
getBlendingAddress()
Returns the address supported for blender.
|
boolean |
gotMessage(InputStream is)
Receives an SMTP message from the transport layer and extracts the message.
|
void |
shutdown() |
VortexMessage |
unblendMessage(byte[] blendedMessage)
Extracts a vortexMessage from a blended message.
|
getTransportSender, getVerifier, setBlenderReceiver, setIncomingMessageListener, setTransportSender, setVerifier
shutdownDaemon, startDaemon, stopDaemon
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
shutdownDaemon, startDaemon, stopDaemon
public SmtpBlender(BlendingReceiver receiver, HeaderVerifier verifier)
public boolean gotMessage(InputStream is)
Receives an SMTP message from the transport layer and extracts the message.
is
- the InputStream containing a possible messagepublic boolean blendMessage(BlendingSpec target, VortexMessage message)
Blender
This method is called by the router layer to blend a message.
blendMessage
in interface BlendingSender
blendMessage
in class Blender
message
- the message to be blendedpublic String getBlendingAddress()
Blender
Returns the address supported for blender.
The address is specified by <transport><address>!<publickey>.
getBlendingAddress
in class Blender
public byte[] blendMessageToBytes(BlendingSpec target, VortexMessage msg)
Blender
Blends a VortexMessage into the apropriate text.
blendMessageToBytes
in class Blender
target
- the blending spec for the recipientmsg
- the message to be blendedpublic VortexMessage unblendMessage(byte[] blendedMessage)
Blender
Extracts a vortexMessage from a blended message.
unblendMessage
in class Blender
blendedMessage
- the blended messagepublic void shutdown()
Copyright © 2023. All rights reserved.