Class SmtpBlender

All Implemented Interfaces:
BlendingSender, RunningDaemon, TransportReceiver

public class SmtpBlender extends Blender
  • Constructor Details

  • Method Details

    • gotMessage

      public boolean gotMessage(InputStream is)

      Receives an SMTP message from the transport layer and extracts the message.

      Parameters:
      is - the InputStream containing a possible message
      Returns:
      true if message has been accepted as vortex message
    • blendMessage

      public boolean blendMessage(BlendingSpec target, VortexMessage message)
      Description copied from class: Blender

      This method is called by the router layer to blend a message.

      Specified by:
      blendMessage in interface BlendingSender
      Specified by:
      blendMessage in class Blender
      message - the message to be blended
      Returns:
      true if blended successfully and sent by the transport layer
    • getBlendingAddress

      public String getBlendingAddress()
      Description copied from class: Blender

      Returns the address supported for blender.

      The address is specified by <transport><address>!<publickey>.

      Specified by:
      getBlendingAddress in class Blender
      Returns:
      The vortex adress.
    • blendMessageToBytes

      public byte[] blendMessageToBytes(BlendingSpec target, VortexMessage msg)
      Description copied from class: Blender

      Blends a VortexMessage into the apropriate text.

      Specified by:
      blendMessageToBytes in class Blender
      Parameters:
      target - the blending spec for the recipient
      msg - the message to be blended
      Returns:
      the blended message
    • unblendMessage

      public VortexMessage unblendMessage(byte[] blendedMessage)
      Description copied from class: Blender

      Extracts a vortexMessage from a blended message.

      Specified by:
      unblendMessage in class Blender
      Parameters:
      blendedMessage - the blended message
      Returns:
      the VortexMessage
    • shutdown

      public void shutdown()