Package pygar.state

Class PmessageDispatcher

java.lang.Object
java.util.Observable
pygar.state.PmessageDispatcher
All Implemented Interfaces:
java.util.Observer

@ThreadSafe
public class PmessageDispatcher
extends java.util.Observable
implements java.util.Observer
A PmessageDispatcher will receive Pmessage objects from an observed source and will dispatch them as updates to the appropriate state machine or compatible observer. Prior to operation, state machines, or other observers, register to receive specific messages. The destination is determined by the name of the recipient, the name of the sender, the broker, the market, and the session in that order. N.b. the class does not extend nor fully implement an Observable.
  • Constructor Summary

    Constructors 
    Constructor Description
    PmessageDispatcher()  
  • Method Summary

    Modifier and Type Method Description
    void addDefaultObserver​(java.util.Observer o)  
    void addObserver​(java.util.Observer o, java.lang.String recipient, java.lang.String sender, java.lang.String broker, java.lang.String market, java.lang.String session)  
    void addUniversalObserver​(java.util.Observer o)  
    void printObservers()  
    void update​(java.util.Observable o, java.lang.Object arg)  

    Methods inherited from class java.util.Observable

    addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • addObserver

      public void addObserver​(java.util.Observer o, java.lang.String recipient, java.lang.String sender, java.lang.String broker, java.lang.String market, java.lang.String session)
    • printObservers

      public void printObservers()
    • addDefaultObserver

      public void addDefaultObserver​(java.util.Observer o)
    • addUniversalObserver

      public void addUniversalObserver​(java.util.Observer o)
    • update

      public void update​(java.util.Observable o, java.lang.Object arg)
      Specified by:
      update in interface java.util.Observer