Class SimpleMessageFactory

java.lang.Object
net.messagevortex.router.MessageFactory
net.messagevortex.router.SimpleMessageFactory

public class SimpleMessageFactory extends MessageFactory
  • Constructor Details

    • SimpleMessageFactory

      public SimpleMessageFactory(String msg, int source, int target, IdentityStoreBlock[] anonGroupMembers, IdentityStore is)

      A simple message factory creating a possibly redundant message path.

      Parameters:
      msg - the message to be used
      source - the source address for the path
      target - the target address for the path
      anonGroupMembers - the anonymity set to be used
      is - the identity store providing the necessary keys and identities
  • Method Details

    • buildMessage

      public static MessageFactory buildMessage(String msg, int source, int target, IdentityStoreBlock[] anonGroupMembers, IdentityStore is)

      Build a message with the specified parameters.

      Parameters:
      msg - the message to be embedded
      source - the indes of the source identity
      target - the index of the target identity
      anonGroupMembers - a set of all available targets in the group set
      is - the identity store to be used
      Returns:
      the built message wrapped in a message factory
    • build

      public RoutingCombo build()

      build a simple message path.

      Specified by:
      build in class MessageFactory
    • setMaxTransferTime

      public long setMaxTransferTime(long newmax)

      Sets the maximum time allowed to transfer the message to the final destination.

      Parameters:
      newmax - the new maximum transfer time in seconds
      Returns:
      the previously set transfer time
    • setMinStepProcessSTime

      public long setMinStepProcessSTime(long newmin)

      Sets the minimum time required to process a message in a node.

      This time includes anti-malware related processing or anti-UBE related actions.

      Parameters:
      newmin - the new time in seconds to be set
      Returns:
      the previously set time
    • getMinMessageTransferStart

      public long getMinMessageTransferStart(long newmin)

      Sets the minimum time required to process a message in a node.

      This time includes anti-malware related processing or anti-UBE related actions.

      Parameters:
      newmin - the new time in seconds to be set
      Returns:
      the previously set time
    • getGraph

      public GraphSet getGraph()

      Gets the previously built message path.

      Specified by:
      getGraph in class MessageFactory
      Returns:
      the message path or null if the previous build has failed
    • main

      public static void main(String[] args) throws IOException

      This is a test methode sheduled to be removed.

      Parameters:
      args - ordinary main args (ignored)
      Throws:
      IOException - if the function was unable to load the identity store from filesystem