@Test public void onNext() throws Exception { JerseyEventSink eventSink = new JerseyEventSink(null); eventSink.close(); thrown.expect(IllegalStateException.class); eventSink.onNext(null); }
@Override public void onNext(final OutboundSseEvent item) { checkClosed(); if (item == null) { throw new NullPointerException(LocalizationMessages.PARAM_NULL("outboundSseEvent")); } try { write(item); } catch (final IOException e) { onError(e); } }
JerseyEventSink extends ChunkedOutput<OutboundSseEvent> implements SseEventSink, Flushable, Flow.Subscriber<OutboundSseEvent> { @Override public void onNext(final OutboundSseEvent item) { checkClosed(); if (item == null) { throw new NullPointerException(LocalizationMessages.PARAM_NULL("outboundSseEvent")); } try { write(item); } catch (final IOException e) { onError(e); } } }
JerseyEventSink extends ChunkedOutput<OutboundSseEvent> implements SseEventSink, Flushable, Flow.Subscriber<OutboundSseEvent> { @Override public void onNext(final OutboundSseEvent item) { checkClosed(); if (item == null) { throw new NullPointerException(LocalizationMessages.PARAM_NULL("outboundSseEvent")); } try { write(item); } catch (final IOException e) { onError(e); } } JerseyEventSink(Provider<AsyncContext> asyncContextProvider); }
JerseyEventSink extends ChunkedOutput<OutboundSseEvent> implements SseEventSink, Flushable, Flow.Subscriber<OutboundSseEvent> { @Override public void onNext(final OutboundSseEvent item) { checkClosed(); if (item == null) { throw new NullPointerException(LocalizationMessages.PARAM_NULL("outboundSseEvent")); } try { write(item); } catch (final IOException e) { onError(e); } } JerseyEventSink(Provider<AsyncContext> asyncContextProvider); @Override void onSubscribe(final Flow.Subscription subscription); @Override void onNext(final OutboundSseEvent item); @Override void onError(final Throwable throwable); @Override void close(); @Override CompletionStage<?> send(OutboundSseEvent event); @Override void flush(); void onComplete(); }
JerseyEventSink extends ChunkedOutput<OutboundSseEvent> implements SseEventSink, Flushable, Flow.Subscriber<OutboundSseEvent> { @Override public void onNext(final OutboundSseEvent item) { checkClosed(); if (item == null) { throw new NullPointerException(LocalizationMessages.PARAM_NULL("outboundSseEvent")); } try { write(item); } catch (final IOException e) { onError(e); } } JerseyEventSink(Provider<AsyncContext> asyncContextProvider); @Override void onSubscribe(final Flow.Subscription subscription); @Override void onNext(final OutboundSseEvent item); @Override void onError(final Throwable throwable); @Override void close(); @Override CompletionStage<?> send(OutboundSseEvent event); @Override void flush(); void onComplete();  }