Class YamcsLink

java.lang.Object
com.google.common.util.concurrent.AbstractService
org.yamcs.tctm.AbstractLink
org.yamcs.cascading.YamcsLink
All Implemented Interfaces:
com.google.common.util.concurrent.Service, EventListener, ConnectionListener, SystemParametersProducer, AggregatedDataLink, Link, LinkActionProvider

public class YamcsLink extends AbstractLink implements AggregatedDataLink, ConnectionListener
  • Constructor Details

    • YamcsLink

      public YamcsLink()
  • Method Details

    • init

      public void init(String instance, String name, YConfiguration config)
      Description copied from interface: Link
      Called at startup to initialize the link.

      The config corresponds to the map that is under the link definition in yamcs.instance.yaml.

      Specified by:
      init in interface Link
      Overrides:
      init in class AbstractLink
      config - - the configuration - cannot be null (but can be empty)
    • getSpec

      public Spec getSpec()
      Description copied from interface: Link
      Returns the valid configuration of the input args of this link.
      Specified by:
      getSpec in interface Link
      Returns:
      the argument specification, or null if the args should not be validated.
    • connectionStatus

      public Link.Status connectionStatus()
      Description copied from class: AbstractLink
      In case the link should be connected (i.e. is running and enabled) this method is called to return the actual connection status
      Specified by:
      connectionStatus in class AbstractLink
    • getSubLinks

      public List<Link> getSubLinks()
      Specified by:
      getSubLinks in interface AggregatedDataLink
    • getDataInCount

      public long getDataInCount()
      Specified by:
      getDataInCount in interface Link
      Overrides:
      getDataInCount in class AbstractLink
    • getDataOutCount

      public long getDataOutCount()
      Specified by:
      getDataOutCount in interface Link
      Overrides:
      getDataOutCount in class AbstractLink
    • resetCounters

      public void resetCounters()
      Specified by:
      resetCounters in interface Link
      Overrides:
      resetCounters in class AbstractLink
    • doDisable

      public void doDisable()
      Overrides:
      doDisable in class AbstractLink
    • doEnable

      public void doEnable()
      Overrides:
      doEnable in class AbstractLink
    • doStart

      protected void doStart()
      Specified by:
      doStart in class com.google.common.util.concurrent.AbstractService
    • doStop

      protected void doStop()
      Specified by:
      doStop in class com.google.common.util.concurrent.AbstractService
    • connecting

      public void connecting()
      Description copied from interface: ConnectionListener
      Called right before the initial connection to Yamcs is being made.
      Specified by:
      connecting in interface ConnectionListener
    • connected

      public void connected()
      Description copied from interface: ConnectionListener
      Called after a successful connection to Yamcs has been established.
      Specified by:
      connected in interface ConnectionListener
    • connectionFailed

      public void connectionFailed(Throwable cause)
      Description copied from interface: ConnectionListener
      Called when the initial connection to Yamcs has failed, e.g. the maximum number of retry attempts has exceeded.
      Specified by:
      connectionFailed in interface ConnectionListener
      Parameters:
      cause - Optional cause of the connection failure, may be null.
    • disconnected

      public void disconnected()
      Description copied from interface: ConnectionListener
      Called when the connection to Yamcs is closed.
      Specified by:
      disconnected in interface ConnectionListener
    • getExecutor

      public ScheduledThreadPoolExecutor getExecutor()