Class AbstractNotificationHandler<T>
- Все реализуемые интерфейсы:
NotificationHandler<T>
public class AbstractNotificationHandler<T> extends Object implements NotificationHandler<T>
Этот класс реализует методы handleNotification так, чтобы они возвращали CONTINUE, благодаря чему все уведомления обрабатываются, а канал продолжает попытки получить сообщение.
Он также предоставляет перегруженные версии методов handleNotification — по одной для каждого из обязательных поддерживаемых типов уведомлений: AssociationChangeNotification, PeerAddressChangeNotification, SendFailedNotification и ShutdownNotification. При получении уведомления будет вызван соответствующий метод.
- Начиная с:
- 1.7
Краткое описание конструкторов
| Модификатор | Конструктор | Описание |
|---|---|---|
protected |
Создает новый экземпляр этого класса. |
Краткое описание методов
| Модификатор и тип | Метод | Описание |
|---|---|---|
HandlerResult |
handleNotification |
Вызывается при получении из стека SCTP уведомления AssociationChangeNotification. |
HandlerResult |
handleNotification |
Вызывается при получении из стека SCTP уведомления, специфичного для реализации. |
HandlerResult |
handleNotification |
Вызывается при получении из стека SCTP уведомления PeerAddressChangeNotification. |
HandlerResult |
handleNotification |
Вызывается при получении из стека SCTP уведомления SendFailedNotification. |
HandlerResult |
handleNotification |
Вызывается при получении из стека SCTP уведомления ShutdownNotification. |
Подробное описание конструкторов
AbstractNotificationHandler
protected AbstractNotificationHandler()
Подробное описание методов
handleNotification
public HandlerResult handleNotification(Notification notification, T attachment)
- Определен в:
-
handleNotificationв интерфейсеNotificationHandler<T> - Параметры:
-
notification— уведомление -
attachment— объект, прикрепленный к операцииreceiveпри ее запуске. - Возвращает:
- результат обработки
handleNotification
public HandlerResult handleNotification(AssociationChangeNotification notification, T attachment)
AssociationChangeNotification.- Параметры:
-
notification— уведомление -
attachment— объект, прикрепленный к операцииreceiveпри ее запуске. - Возвращает:
- результат обработки
handleNotification
public HandlerResult handleNotification(PeerAddressChangeNotification notification, T attachment)
PeerAddressChangeNotification.- Параметры:
-
notification— уведомление -
attachment— объект, прикрепленный к операцииreceiveпри ее запуске. - Возвращает:
- результат обработки
handleNotification
public HandlerResult handleNotification(SendFailedNotification notification, T attachment)
SendFailedNotification.- Параметры:
-
notification— уведомление -
attachment— объект, прикрепленный к операцииreceiveпри ее запуске. - Возвращает:
- результат обработки
handleNotification
public HandlerResult handleNotification(ShutdownNotification notification, T attachment)
ShutdownNotification.- Параметры:
-
notification— уведомление -
attachment— объект, прикрепленный к операцииreceiveпри ее запуске. - Возвращает:
- результат обработки
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/jdk.sctp/com/sun/nio/sctp/AbstractNotificationHandler.html