Package org.infinispan.rest
Class EventStream
- java.lang.Object
-
- org.infinispan.rest.EventStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class EventStream extends Object implements Closeable
- Since:
- 13.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
-
Constructor Summary
Constructors Constructor Description EventStream(Consumer<EventStream> onOpen, Runnable onClose)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
CompletionStage<Void>
sendEvent(ServerSentEvent e)
void
setChannelHandlerContext(io.netty.channel.ChannelHandlerContext ctx)
-
-
-
Constructor Detail
-
EventStream
public EventStream(Consumer<EventStream> onOpen, Runnable onClose)
-
-
Method Detail
-
sendEvent
public CompletionStage<Void> sendEvent(ServerSentEvent e)
-
close
public void close() throws IOException
- Throws:
IOException
-
setChannelHandlerContext
public void setChannelHandlerContext(io.netty.channel.ChannelHandlerContext ctx)
-
-