Java Code Examples for com.sun.nio.sctp.HandlerResult#CONTINUE

The following examples show how to use com.sun.nio.sctp.HandlerResult#CONTINUE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ReceiveIntoDirect.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        ShutdownNotification notification, Object attachment) {
    debug("ShutdownNotification");
    debug("  Association: " + notification.association());
    return HandlerResult.CONTINUE;
}
 
Example 2
Source File: Receive.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        AssociationChangeNotification notification, Object attachment) {
    AssocChangeEvent event = notification.event();
    debug("AssociationChangeNotification");
    debug("  Association: " + notification.association());
    debug("  Event: " + event);

    if (event.equals(AssocChangeEvent.COMM_UP))
        receivedCommUp = true;

    if (channel == null)
        return HandlerResult.RETURN;

    /* TEST 4: IllegalReceiveException - If the given handler invokes
     * the receive method of this channel*/
    ByteBuffer buffer = ByteBuffer.allocate(10);
    try {
        channel.receive(buffer, null, this);
        fail("IllegalReceiveException expected");
    } catch (IllegalReceiveException unused) {
        pass();
    } catch (IOException ioe) {
        unexpected(ioe);
    }

    return HandlerResult.CONTINUE;
}
 
Example 3
Source File: Receive.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        AssociationChangeNotification notification, Object attachment) {
    AssocChangeEvent event = notification.event();
    debug("AssociationChangeNotification");
    debug("  Association: " + notification.association());
    debug("  Event: " + event);

    if (event.equals(AssocChangeEvent.COMM_UP))
        receivedCommUp = true;

    if (channel == null)
        return HandlerResult.RETURN;

    /* TEST 4: IllegalReceiveException - If the given handler invokes
     * the receive method of this channel*/
    ByteBuffer buffer = ByteBuffer.allocate(10);
    try {
        channel.receive(buffer, null, this);
        fail("IllegalReceiveException expected");
    } catch (IllegalReceiveException unused) {
        pass();
    } catch (IOException ioe) {
        unexpected(ioe);
    }

    return HandlerResult.CONTINUE;
}
 
Example 4
Source File: Receive.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        ShutdownNotification notification, Object attachment) {
    debug("ShutdownNotification");
    debug("  Association: " + notification.association());
    return HandlerResult.CONTINUE;
}
 
Example 5
Source File: Receive.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        AssociationChangeNotification notification, Object attachment) {
    AssocChangeEvent event = notification.event();
    debug("AssociationChangeNotification");
    debug("  Association: " + notification.association());
    debug("  Event: " + event);

    if (event.equals(AssocChangeEvent.COMM_UP))
        receivedCommUp = true;

    if (channel == null)
        return HandlerResult.RETURN;

    /* TEST 4: IllegalReceiveException - If the given handler invokes
     * the receive method of this channel*/
    ByteBuffer buffer = ByteBuffer.allocate(10);
    try {
        channel.receive(buffer, null, this);
        fail("IllegalReceiveException expected");
    } catch (IllegalReceiveException unused) {
        pass();
    } catch (IOException ioe) {
        unexpected(ioe);
    }

    return HandlerResult.CONTINUE;
}
 
Example 6
Source File: ReceiveIntoDirect.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        PeerAddressChangeNotification pacn, Object unused)
{
    debug("PeerAddressChangeNotification: " +  pacn);
    return HandlerResult.CONTINUE;
}
 
Example 7
Source File: ReceiveIntoDirect.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        ShutdownNotification notification, Object attachment) {
    debug("ShutdownNotification");
    debug("  Association: " + notification.association());
    return HandlerResult.CONTINUE;
}
 
Example 8
Source File: Bind.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        AssociationChangeNotification acn, Object unused)
{
    debug("AssociationChangeNotification: " +  acn);
    return HandlerResult.CONTINUE;
}
 
Example 9
Source File: ReceiveIntoDirect.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        AssociationChangeNotification notification, Object attachment) {
    AssocChangeEvent event = notification.event();
    debug("AssociationChangeNotification");
    debug("  Association: " + notification.association());
    debug("  Event: " + event);

    if (event.equals(AssocChangeEvent.COMM_UP))
        receivedCommUp = true;

    return HandlerResult.CONTINUE;
}
 
Example 10
Source File: Receive.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        AssociationChangeNotification notification, Object attachment) {
    AssocChangeEvent event = notification.event();
    debug("AssociationChangeNotification");
    debug("  Association: " + notification.association());
    debug("  Event: " + event);

    if (event.equals(AssocChangeEvent.COMM_UP))
        receivedCommUp = true;

    if (channel == null)
        return HandlerResult.RETURN;

    /* TEST 4: IllegalReceiveException - If the given handler invokes
     * the receive method of this channel*/
    ByteBuffer buffer = ByteBuffer.allocate(10);
    try {
        channel.receive(buffer, null, this);
        fail("IllegalReceiveException expected");
    } catch (IllegalReceiveException unused) {
        pass();
    } catch (IOException ioe) {
        unexpected(ioe);
    }

    return HandlerResult.CONTINUE;
}
 
Example 11
Source File: ReceiveIntoDirect.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        PeerAddressChangeNotification pacn, Object unused)
{
    debug("PeerAddressChangeNotification: " +  pacn);
    return HandlerResult.CONTINUE;
}
 
Example 12
Source File: Bind.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        ShutdownNotification sn, Object unused)
{
    debug("ShutdownNotification: " +  sn);
    return HandlerResult.CONTINUE;
}
 
Example 13
Source File: Bind.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        PeerAddressChangeNotification pacn, Object unused)
{
    debug("PeerAddressChangeNotification: " +  pacn);
    return HandlerResult.CONTINUE;
}
 
Example 14
Source File: Bind.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        AssociationChangeNotification acn, Object unused)
{
    debug("AssociationChangeNotification: " +  acn);
    return HandlerResult.CONTINUE;
}
 
Example 15
Source File: SctpChannelImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public HandlerResult handleNotification(
        AssociationChangeNotification not, Object unused) {
    if (not.event().equals(
            AssociationChangeNotification.AssocChangeEvent.COMM_UP) &&
            association == null) {
        AssociationChange sac = (AssociationChange) not;
        association = new AssociationImpl
               (sac.assocId(), sac.maxInStreams(), sac.maxOutStreams());
    }
    return HandlerResult.CONTINUE;
}
 
Example 16
Source File: Send.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
@Override
public HandlerResult handleNotification(
        Notification notification, Void attachment) {
    fail("Unknown notification type");
    return HandlerResult.CONTINUE;
}
 
Example 17
Source File: CommUp.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public HandlerResult handleNotification(
        Notification notification, Object attachment) {
    fail("Unknown notification type");
    return HandlerResult.CONTINUE;
}
 
Example 18
Source File: SctpNotificationHandler.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerResult handleNotification(PeerAddressChangeNotification notification, Object o) {
    fireEvent(notification);
    return HandlerResult.CONTINUE;
}
 
Example 19
Source File: SctpNotificationHandler.java    From netty-4.1.22 with Apache License 2.0 4 votes vote down vote up
@Override
public HandlerResult handleNotification(SendFailedNotification notification, Object o) {
    fireEvent(notification);
    return HandlerResult.CONTINUE;
}
 
Example 20
Source File: CommUp.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public HandlerResult handleNotification(
        Notification notification, Object attachment) {
    fail("Unknown notification type");
    return HandlerResult.CONTINUE;
}