Annotation Type ServerSentEvent


  • @Target(TYPE)
    @Retention(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 {
             ...
         }
     
    Author:
    Jitendra Kotamraju, [email protected]
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String value
      The URL pattern of the source of server-sent events
    • Element Detail

      • value

        String value
        The URL pattern of the source of server-sent events