Class SimpleTcpOutputStrategy

  • All Implemented Interfaces:
    TcpOutputStrategy

    public class SimpleTcpOutputStrategy
    extends java.lang.Object
    implements TcpOutputStrategy
    Provides a simple non-queued implementation of TcpOutputStrategy that pushes data to the stream one reading at a time.

    The receiver of this strategy is not defined in any way. This is just a fire and forget strategy. There is no way to read data back into opennms.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getHost()
      getHost
      int getPort()
      getPort
      void setHost​(java.lang.String host)
      setHost
      void setPort​(int port)
      setPort
      void updateData​(java.lang.String path, java.lang.String owner, java.lang.Long timestamp, java.util.List<java.lang.Double> dblValues, java.util.List<java.lang.String> strValues)
      Updates the TCP output stream with the supplied values
      • Methods inherited from class java.lang.Object

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

      • SimpleTcpOutputStrategy

        public SimpleTcpOutputStrategy()
    • Method Detail

      • getHost

        public java.lang.String getHost()

        getHost

        Returns:
        a String object.
      • setHost

        public void setHost​(java.lang.String host)

        setHost

        Parameters:
        host - a String object.
      • getPort

        public int getPort()

        getPort

        Returns:
        a int.
      • setPort

        public void setPort​(int port)

        setPort

        Parameters:
        port - a int.
      • updateData

        public void updateData​(java.lang.String path,
                               java.lang.String owner,
                               java.lang.Long timestamp,
                               java.util.List<java.lang.Double> dblValues,
                               java.util.List<java.lang.String> strValues)
                        throws java.lang.Exception
        Updates the TCP output stream with the supplied values
        Specified by:
        updateData in interface TcpOutputStrategy
        Parameters:
        path - the hierarchy path for the data
        owner - the owner of the data
        dblValues - a list of Double values
        strValues - a list of String values
        Throws:
        java.lang.Exception - if an error occurs updating the file