org.glassfish.jersey.server
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.addBroadcasterListener(BroadcasterListener).

Author:
Martin Matula (martin.matula at oracle.com)

Method Summary
 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.
 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.
 

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.


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.