Class DipPublicationImp

    • Method Detail

      • finalize

        public void finalize()
        Remove C++ implementation if user forgot to call DipFactory.destroyPublication
        Overrides:
        finalize in class java.lang.Object
      • send

        public void send​(DipData value,
                         DipTimestamp timestamp,
                         int dipQuality,
                         java.lang.String qualityReason)
                  throws DipException
        Description copied from interface: DipPublication
        Send complex data object with quality information
        Parameters:
        value - - data to be sent.
        timestamp - - time data was obtained.
        dipQuality - - the quality of the data
        qualityReason - - the reason for the data quality
        Throws:
        DipException
      • setQualityBad

        public void setQualityBad()
                           throws DipException
        Description copied from interface: DipPublication
        The quality of the last sent data is set to bad. If this causes a change to the previous quality then the data (value, quality and timestamp) will be sent to all clients. This quality is to be used when the data obtained from the source for the publication is not valid. So instead of introducing bad data into DIP (and thus overwriting the last good value), the quality is set to bad, so still making the last good value available to clients who can make use of it.
        Throws:
        DipException
      • setQualityBad

        public void setQualityBad​(java.lang.String reason)
                           throws DipException
        Description copied from interface: DipPublication
        As setQualityBad() but enables the user to pass a string to the clients explaining why there is a problem
        Throws:
        DipException
      • setQualityUncertain

        public void setQualityUncertain()
                                 throws DipException
        Description copied from interface: DipPublication
        The quality of the last sent data is set to uncertain. If this causes a change to the previous quality then the data (value, quality and timestamp) will be sent to all clients. This quality is to be used when the data source for the publication is not reachable - thus we can not be certain if the value last sent is still valid.
        Throws:
        DipException
      • setQualityUncertain

        public void setQualityUncertain​(java.lang.String reason)
                                 throws DipException
        Description copied from interface: DipPublication
        As setQualityUncertain() but enables the user to pass a string to the clients explaining why there is a problem
        Throws:
        DipException
      • handleException

        public void handleException​(DipException ex)
        Delegates to the error handler. This is an entry point for the C++ implementation.
      • setDestroyed

        protected void setDestroyed()
        Mark object as destoyed - will cause the C++ representation to be removed
        Specified by:
        setDestroyed in class FactoryProduct