Package com.linecorp.armeria.common.sse
Class ServerSentEventBuilder
- java.lang.Object
-
- com.linecorp.armeria.common.sse.ServerSentEventBuilder
-
public class ServerSentEventBuilder extends Object
A builder which creates aServerSentEvent
instance.
-
-
Constructor Summary
Constructors Constructor Description ServerSentEventBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServerSentEvent
build()
Creates a newServerSentEvent
instance.ServerSentEventBuilder
comment(String comment)
Sets the specifiedcomment
.ServerSentEventBuilder
data(String data)
Sets the specifieddata
.ServerSentEventBuilder
event(String event)
Sets the specifiedevent
.ServerSentEventBuilder
id(String id)
Sets the specifiedid
.ServerSentEventBuilder
retry(Duration retry)
Sets the specifiedretry
.
-
-
-
Method Detail
-
id
public ServerSentEventBuilder id(String id)
Sets the specifiedid
.
-
event
public ServerSentEventBuilder event(String event)
Sets the specifiedevent
.
-
retry
public ServerSentEventBuilder retry(Duration retry)
Sets the specifiedretry
.
-
comment
public ServerSentEventBuilder comment(String comment)
Sets the specifiedcomment
.
-
data
public ServerSentEventBuilder data(String data)
Sets the specifieddata
.
-
build
public ServerSentEvent build()
Creates a newServerSentEvent
instance.
-
-