Class ForkProtocol

  • All Implemented Interfaces:
    Lifecycle

    public class ForkProtocol
    extends Protocol
    Acts as bottom protocol of a fork-stack. Knows about the fork-stack-id and inserts it into the ForkHeader of messages sent down the stack
    Since:
    3.4
    Author:
    Bela Ban
    • Field Detail

      • fork_stack_id

        protected final java.lang.String fork_stack_id
    • Constructor Detail

      • ForkProtocol

        public ForkProtocol​(java.lang.String fork_stack_id)
    • Method Detail

      • down

        public java.lang.Object down​(Event evt)
        Description copied from class: Protocol
        An event is to be sent down the stack. A protocol may want to examine its type and perform some action on it, depending on the event's type. If the event is a message MSG, then the protocol may need to add a header to it (or do nothing at all) before sending it down the stack using down_prot.down().
        Overrides:
        down in class Protocol
      • down

        public java.lang.Object down​(Message msg)
        Description copied from class: Protocol
        A message is sent down the stack. Protocols may examine the message and do something (e.g. add a header) with it, before passing it down.
        Overrides:
        down in class Protocol