@Target(value=TYPE) @Retention(value=RUNTIME) public @interface ServerSentEvent
ServerSentEvent
indicates a server component that pushes
notifications to clients via a HTTP connection. Browser applications
typically use EventSource
API to connect to this source of server-sent events.
Server component class needs to have ServerSentEvent
annotation and
provides the implementation of ServerSentEventHandler
. For example:
@ServerSentEvent("/foo")
public class FooHandler extends ServerSentEventHandler {
...
}
public abstract String value
Copyright © 2021. All rights reserved.