APIdia Launch Partner
Top Description Constructors Methods
com.sun.nio.sctp

public Class AbstractNotificationHandler<T>

extends Object
implements NotificationHandler<T>
Class Inheritance
All Implemented Interfaces
com.sun.nio.sctp.NotificationHandler

A skeletal handler that consumes notifications and continues.

This class trivially implements the handleNotification methods to return CONTINUE so that all notifications are consumed and the channel continues to try and receive a message.

It also provides overloaded versions of the handleNotification methods, one for each of the required supported notification types, AssociationChangeNotification, PeerAddressChangeNotification, SendFailedNotification, and ShutdownNotification. The appropriate method will be invoked when the notification is received.

Since
1.7

Constructor Summary

AccessConstructor and Description
protected
AbstractNotificationHandler()

Initializes a new instance of this class.

Method Summary

Modifier and TypeMethod and Description
public HandlerResult

Returns:

The handler result
handleNotification
(Notification
The notification
notification
,
T
The object attached to the receive operation when it was initiated.
attachment
)

Implements com.sun.nio.sctp.NotificationHandler.handleNotification.

Invoked when an implementation specific notification is received from the SCTP stack.

public HandlerResult

Returns:

The handler result
handleNotification
(AssociationChangeNotification
The notification
notification
,
T
The object attached to the receive operation when it was initiated.
attachment
)

Invoked when an AssociationChangeNotification is received from the SCTP stack.

public HandlerResult

Returns:

The handler result
handleNotification
(PeerAddressChangeNotification
The notification
notification
,
T
The object attached to the receive operation when it was initiated.
attachment
)

Invoked when an PeerAddressChangeNotification is received from the SCTP stack.

public HandlerResult

Returns:

The handler result
handleNotification
(SendFailedNotification
The notification
notification
,
T
The object attached to the receive operation when it was initiated.
attachment
)

Invoked when an SendFailedNotification is received from the SCTP stack.

public HandlerResult

Returns:

The handler result
handleNotification
(ShutdownNotification
The notification
notification
,
T
The object attached to the receive operation when it was initiated.
attachment
)

Invoked when an ShutdownNotification is received from the SCTP stack.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractNotificationHandlerback to summary
protected AbstractNotificationHandler()

Initializes a new instance of this class.

Method Detail

handleNotificationback to summary
public HandlerResult handleNotification(Notification notification, T attachment)

Implements com.sun.nio.sctp.NotificationHandler.handleNotification.

Invoked when an implementation specific notification is received from the SCTP stack.

Parameters
notification:Notification

The notification

attachment:T

The object attached to the receive operation when it was initiated.

Returns:HandlerResult

The handler result

Annotations
@Override
handleNotificationback to summary
public HandlerResult handleNotification(AssociationChangeNotification notification, T attachment)

Invoked when an AssociationChangeNotification is received from the SCTP stack.

Parameters
notification:AssociationChangeNotification

The notification

attachment:T

The object attached to the receive operation when it was initiated.

Returns:HandlerResult

The handler result

handleNotificationback to summary
public HandlerResult handleNotification(PeerAddressChangeNotification notification, T attachment)

Invoked when an PeerAddressChangeNotification is received from the SCTP stack.

Parameters
notification:PeerAddressChangeNotification

The notification

attachment:T

The object attached to the receive operation when it was initiated.

Returns:HandlerResult

The handler result

handleNotificationback to summary
public HandlerResult handleNotification(SendFailedNotification notification, T attachment)

Invoked when an SendFailedNotification is received from the SCTP stack.

Parameters
notification:SendFailedNotification

The notification

attachment:T

The object attached to the receive operation when it was initiated.

Returns:HandlerResult

The handler result

handleNotificationback to summary
public HandlerResult handleNotification(ShutdownNotification notification, T attachment)

Invoked when an ShutdownNotification is received from the SCTP stack.

Parameters
notification:ShutdownNotification

The notification

attachment:T

The object attached to the receive operation when it was initiated.

Returns:HandlerResult

The handler result