クラスAbstractNotificationHandler<T>

java.lang.Object
com.sun.nio.sctp.AbstractNotificationHandler<T>
すべての実装されたインタフェース:
NotificationHandler<T>

public class AbstractNotificationHandler<T> extends Object implements NotificationHandler<T>
通知を処理してから続行するスケルトン・ハンドラです。

このクラスは、すべての通知が消費され、チャネルがメッセージの受信を試みることを続けるように、CONTINUEを返すだけのhandleNotificationメソッドを実装します。

また、サポートが必要な通知型ごとに1つ、handleNotificationメソッドのオーバーロードされたバージョンも提供します(AssociationChangeNotificationPeerAddressChangeNotificationSendFailedNotificationShutdownNotification)。 通知が受信されると、適切なメソッドが呼び出されます。

導入されたバージョン:
1.7
  • コンストラクタのサマリー

    コンストラクタ
    修飾子
    コンストラクタ
    説明
    protected
    このクラスの新しいインスタンスを初期化します。
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    SCTPスタックからAssociationChangeNotificationを受信したときに呼び出されます。
    handleNotification(Notification notification, T attachment)
    SCTPスタックから実装固有の通知を受信したときに呼び出されます。
    SCTPスタックからPeerAddressChangeNotificationを受信したときに呼び出されます。
    handleNotification(SendFailedNotification notification, T attachment)
    SCTPスタックからSendFailedNotificationを受信したときに呼び出されます。
    handleNotification(ShutdownNotification notification, T attachment)
    SCTPスタックからShutdownNotificationを受信したときに呼び出されます。

    クラスオブジェクトで宣言されたメソッド

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    修飾子と型
    メソッド
    説明
    protected Object
    このオブジェクトのコピーを作成して、返します。
    boolean
    このオブジェクトと他のオブジェクトが等しいかどうかを示します。
    protected void
    削除予定のため非推奨: このAPI要素は、将来のバージョンで削除される可能性があります。
    最終決定は非推奨であり、将来のリリースで削除される可能性があります。
    final Class<?>
    このObjectの実行時クラスを返します。
    int
    このオブジェクトに対するハッシュ・コード値を返します。
    final void
    このオブジェクトのモニターで待機中のスレッドを1つ再開します。
    final void
    このオブジェクトのモニターで待機中のすべてのスレッドを再開します。
    オブジェクトの文字列表現を返します。
    final void
    現在のスレッドが目覚めるまで待機します。通常、notifiedまたはinterruptedです。
    final void
    wait(long timeoutMillis)
    現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。
    final void
    wait(long timeoutMillis, int nanos)
    現在のスレッドは、通常、notifiedまたはinterruptedであるか、一定のリアルタイムが経過するまで、目覚めるまで待機します。
  • コンストラクタの詳細

    • AbstractNotificationHandler

      protected AbstractNotificationHandler()
      このクラスの新しいインスタンスを初期化します。
  • メソッドの詳細

    • handleNotification

      public HandlerResult handleNotification(Notification notification, T attachment)
      SCTPスタックから実装固有の通知を受信したときに呼び出されます。
      定義:
      handleNotification、インタフェースNotificationHandler<T>
      パラメータ:
      notification - 通知
      attachment - receive操作の開始時に接続されるオブジェクト。
      戻り値:
      ハンドラの結果
    • handleNotification

      public HandlerResult handleNotification(AssociationChangeNotification notification, T attachment)
      SCTPスタックからAssociationChangeNotificationを受信したときに呼び出されます。
      パラメータ:
      notification - 通知
      attachment - receive操作の開始時に接続されるオブジェクト。
      戻り値:
      ハンドラの結果
    • handleNotification

      public HandlerResult handleNotification(PeerAddressChangeNotification notification, T attachment)
      SCTPスタックからPeerAddressChangeNotificationを受信したときに呼び出されます。
      パラメータ:
      notification - 通知
      attachment - receive操作の開始時に接続されるオブジェクト。
      戻り値:
      ハンドラの結果
    • handleNotification

      public HandlerResult handleNotification(SendFailedNotification notification, T attachment)
      SCTPスタックからSendFailedNotificationを受信したときに呼び出されます。
      パラメータ:
      notification - 通知
      attachment - receive操作の開始時に接続されるオブジェクト。
      戻り値:
      ハンドラの結果
    • handleNotification

      public HandlerResult handleNotification(ShutdownNotification notification, T attachment)
      SCTPスタックからShutdownNotificationを受信したときに呼び出されます。
      パラメータ:
      notification - 通知
      attachment - receive操作の開始時に接続されるオブジェクト。
      戻り値:
      ハンドラの結果