Class StreamWorker<T extends Node>

    • Constructor Detail

      • StreamWorker

        public StreamWorker()
    • Method Detail

      • work

        protected final void work()
                           throws Throwable
        Description copied from class: NodeWorker
        Implement this method to let the node perform some useful work.

        Implementors are free to throw whatever exception they see fit. If any Throwable is thrown from this method, the failure manager is notified about the fatal failure of the whole pipeline.

        Specified by:
        work in class NodeWorker<T extends Node>
        Throws:
        Throwable - in case of processing failure
      • reject

        protected boolean reject​(StreamDescriptor descriptor)
        Check whether to reject a stream based on its descriptor. The default implementation rejects all streams (but streams previously accepted will be worked on anyway, since accept takes precedence over reject).
        Parameters:
        descriptor -
        Returns:
        true - rejects all streams
      • accept

        protected boolean accept​(StreamDescriptor descriptor)
        Check whether to accept a stream (and work on it) based on its descriptor. The default implementation accepts all streams.
        Parameters:
        descriptor - StreamDescriptor that shall be checked
        Returns:
        true
      • work

        protected abstract void work​(Stream stream)
                              throws Throwable
        Implement this method in order to work on a single stream.
        Parameters:
        stream - the Stream to work on
        Throws:
        Throwable - in case of processing failure