Interface EventCodec

  • All Superinterfaces:
    EventDecoder
    All Known Implementing Classes:
    AbstractEventCodec

    public interface EventCodec
    extends EventDecoder
    EventCodec defines the interface that Java IAF codecs implement so they can be used by the IAF to convert a downstream event from the transport into the normalised form required by the Semantic Mapper.

    • Field Detail

      • API_VERSION

        static final int API_VERSION
        Codec API version. The upper 16 bits identify the major release of the API; the lower 16 bits indicate minor versions within that release. No changes that break backward binary compatibility will be made within a given major release of the API. That is, minor releases may add functionality and fix bugs, but will not change or remove any documented behaviour.

        Version history:

        1.1 First public version, with interface similar to C interface 1.1.

        1.2 Added new thrown exceptions, so that Semantic Mapper and CodecException errors can be passed straight up the chain of callers, without wrapping inside other exceptions.

        4.0 Addition of high-accuracy timestamps for latency measurement.

        See Also:
        Constant Field Values
    • Method Detail

      • sendNormalisedEvent

        void sendNormalisedEvent​(NormalisedEvent event,
                                 TimestampSet timestamps)
                          throws CodecException,
                                 TransportException
        Called by the Semantic Mapper to encode a normalised event and send it through to the transport.
        Parameters:
        event - A NormalisedEvent representing the event to be encoded.
        timestamps - A TimestampSet representing the timestamps attached to the event.
        Throws:
        CodecException - Thrown by the codec if the event provided has an invalid format.
        TransportException - Thrown if an error occurred in the Transport when sending the message.