Spec-Zone.ru › OpenJDK 27

Interface NotificationHandler<T>

Type Parameters:
T - The type of the object attached to the receive operation
All Known Implementing Classes:
AbstractNotificationHandler
public interface NotificationHandler<T>
A handler for consuming notifications from the SCTP stack.

The SCTP channels defined in this package allow a notification handler to be specified to consume notifications from the SCTP stack. When a notification is received the handleNotification method of the handler is invoked to handle that notification.

Additionally, an attachment object can be attached to the receive operation to provide context when consuming the notification. The attachment is important for cases where a state-less NotificationHandler is used to consume the result of many receive operations.

Handler implementations are encouraged to extend the AbstractNotificationHandler class which implements this interface and provide notification specific methods. However, an API should generally use this handler interface as the type for parameters, return type, etc. rather than the abstract class.

Since:
1.7

Method Summary

Modifier and Type Method Description
HandlerResult handleNotification(Notification notification, T attachment)
Invoked when a notification is received from the SCTP stack.

Method Details

handleNotification

HandlerResult handleNotification(Notification notification, T attachment)
Invoked when a notification is received from the SCTP stack.
Parameters:
notification - The notification
attachment - The object attached to the receive operation when it was initiated.
Returns:
The handler result

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2026, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 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.

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API