Interface BroadcasterListener<T>

  • All Known Implementing Classes:
    Broadcaster

    public interface BroadcasterListener<T>
    Listener interface that can be implemented to listen to events fired by Broadcaster object. To listen to events, implementation of this interface needs to register with a particular Broadcaster instance using Broadcaster.add(BroadcasterListener).
    Author:
    Martin Matula
    • Method Detail

      • onException

        void onException​(ChunkedOutput<T> chunkedOutput,
                         Exception exception)
        Called when exception was thrown by a given chunked response when trying to write to it or close it.
        Parameters:
        chunkedOutput - instance that threw exception
        exception - thrown exception
      • onClose

        void onClose​(ChunkedOutput<T> chunkedOutput)
        Called when the chunkedOutput has been closed (either by client closing the connection or by calling ChunkedOutput.close() on the server side.
        Parameters:
        chunkedOutput - instance that has been closed.