Add ServerSentEvent#toString()

This commit is contained in:
Sebastien Deleuze 2016-12-20 17:12:54 +01:00
parent 419d2b4e0a
commit 183b326f6d
1 changed files with 8 additions and 0 deletions

View File

@ -109,6 +109,13 @@ public class ServerSentEvent<T> {
return Optional.ofNullable(this.comment);
}
@Override
public String toString() {
return "ServerSentEvent [id = '" + id + '\'' + ", event='" + event + '\'' +
", data=" + data + ", retry=" + retry + ", comment='" + comment + '\'' +
']';
}
/**
* A mutable builder for a {@code SseEvent}.
*
@ -167,6 +174,7 @@ public class ServerSentEvent<T> {
* @return the built event
*/
ServerSentEvent<T> build();
}
private static class BuilderImpl<T> implements Builder<T> {