クラス ServerSentEvent<T>

java.lang.ObjectSE
org.springframework.http.codec.ServerSentEvent<T>
型パラメーター:
T - このイベントに含まれるデータの型

public final class ServerSentEvent<T> extends ObjectSE
Spring のリアクティブ Web サポートで使用するサーバー送信イベントの表現。Flux<ServerSentEvent> または Observable<ServerSentEvent> は、Spring MVC の SseEmitter と同等のリアクティブです。
導入:
5.0
作成者:
Sebastien Deleuze, Arjen Poutsma
関連事項:
  • メソッドの詳細

    • id

      @Nullable public StringSE id()
      可能であれば、このイベントの id フィールドを返します。
    • event

      @Nullable public StringSE event()
      可能であれば、このイベントの event フィールドを返します。
    • retry

      @Nullable public DurationSE retry()
      可能であれば、このイベントの retry フィールドを返します。
    • comment

      @Nullable public StringSE comment()
      可能であれば、このイベントのコメントを返します。
    • data

      @Nullable public T data()
      可能であれば、このイベントの data フィールドを返します。
    • toString

      public StringSE toString()
      オーバーライド:
      クラス ObjectSEtoString 
    • builder

      public static <T> ServerSentEvent.Builder<T> builder()
      SseEvent のビルダーを返します。
      型パラメーター:
      T - このイベントに含まれるデータの型
      戻り値:
      ビルダー
    • builder

      public static <T> ServerSentEvent.Builder<T> builder(T data)
      指定されたデータが入力された SseEvent のビルダーを返します。
      型パラメーター:
      T - このイベントに含まれるデータの型
      戻り値:
      ビルダー