Class RoutingMessage

java.lang.Object
org.simplesim.core.messaging.AbstractMessage<int[]>
org.simplesim.core.messaging.RoutingMessage

public final class RoutingMessage extends AbstractMessage<int[]>
Special message class for using auto routing.

If using a RoutingPort to use the routing functionality, messages have to be derived from this class.

The addresses describe the model's branch within the model tree as int arrays. The level of the tree is the index of the array whereas the actual number is the id of the agent within the model level. The level of the root domain is always 0.

This class is immutable and thus thread-safe.

  • Constructor Details

    • RoutingMessage

      public RoutingMessage(int[] source, int[] destination, Object content)
  • Method Details

    • getDestIndex

      public int getDestIndex(int level)
    • toString

      public String toString()
      Overrides:
      toString in class Object