Class NetworkReceiver

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public abstract class NetworkReceiver
    extends java.lang.Object
    implements java.lang.AutoCloseable
    Manages the interface between the PublishAnnotatedOperation and the actual network protocol implemented by a specific Manager.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String path  
    • Constructor Summary

      Constructors 
      Constructor Description
      NetworkReceiver​(java.lang.String path)
      Create a new NetworkReceiver with the specified path.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract void addListener​(java.util.function.Consumer<java.lang.Object> consumer)
      Add a listener to the NetworkReceiver item.
      abstract void close()
      Close the network receiver.
      abstract java.lang.Object getValue()
      Get the value of the object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • path

        protected final java.lang.String path
    • Constructor Detail

      • NetworkReceiver

        public NetworkReceiver​(java.lang.String path)
        Create a new NetworkReceiver with the specified path.
        Parameters:
        path - The path of the object to get
    • Method Detail

      • getValue

        public abstract java.lang.Object getValue()
        Get the value of the object.
        Returns:
        The value of this NetworkReceiver
      • addListener

        public abstract void addListener​(java.util.function.Consumer<java.lang.Object> consumer)
        Add a listener to the NetworkReceiver item.
        Parameters:
        consumer - The consumer to call when this item has a update
      • close

        public abstract void close()
        Close the network receiver. This should not throw an exception.
        Specified by:
        close in interface java.lang.AutoCloseable