Cleanup imports and add javadocs
This commit is contained in:
parent
b2a3ba8154
commit
a15213d751
@ -29,7 +29,7 @@ public final class SctpData implements SctpMessage {
|
|||||||
|
|
||||||
private final ByteBuf payloadBuffer;
|
private final ByteBuf payloadBuffer;
|
||||||
|
|
||||||
private MessageInfo msgInfo;
|
private final MessageInfo msgInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Essential data that is being carried within SCTP Data Chunk
|
* Essential data that is being carried within SCTP Data Chunk
|
||||||
@ -41,6 +41,7 @@ public final class SctpData implements SctpMessage {
|
|||||||
this.protocolIdentifier = protocolIdentifier;
|
this.protocolIdentifier = protocolIdentifier;
|
||||||
this.streamIdentifier = streamIdentifier;
|
this.streamIdentifier = streamIdentifier;
|
||||||
this.payloadBuffer = payloadBuffer;
|
this.payloadBuffer = payloadBuffer;
|
||||||
|
this.msgInfo = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SctpData(MessageInfo msgInfo, ByteBuf payloadBuffer) {
|
public SctpData(MessageInfo msgInfo, ByteBuf payloadBuffer) {
|
||||||
|
@ -18,8 +18,8 @@ package io.netty.channel.socket;
|
|||||||
import com.sun.nio.sctp.Notification;
|
import com.sun.nio.sctp.Notification;
|
||||||
|
|
||||||
public final class SctpNotification implements SctpMessage {
|
public final class SctpNotification implements SctpMessage {
|
||||||
private Notification notification;
|
private final Notification notification;
|
||||||
private Object attachment;
|
private final Object attachment;
|
||||||
|
|
||||||
|
|
||||||
public SctpNotification(Notification notification, Object attachment) {
|
public SctpNotification(Notification notification, Object attachment) {
|
||||||
@ -27,10 +27,17 @@ public final class SctpNotification implements SctpMessage {
|
|||||||
this.attachment = attachment;
|
this.attachment = attachment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the {@link Notification}
|
||||||
|
*/
|
||||||
public Notification notification() {
|
public Notification notification() {
|
||||||
return notification;
|
return notification;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the attachment of this {@link SctpNotification}, or
|
||||||
|
* <code>null</code> if no attachment was provided
|
||||||
|
*/
|
||||||
public Object attachment() {
|
public Object attachment() {
|
||||||
return attachment;
|
return attachment;
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ import com.sun.nio.sctp.Notification;
|
|||||||
import com.sun.nio.sctp.PeerAddressChangeNotification;
|
import com.sun.nio.sctp.PeerAddressChangeNotification;
|
||||||
import com.sun.nio.sctp.SendFailedNotification;
|
import com.sun.nio.sctp.SendFailedNotification;
|
||||||
import com.sun.nio.sctp.ShutdownNotification;
|
import com.sun.nio.sctp.ShutdownNotification;
|
||||||
import io.netty.channel.ChannelPipeline;
|
|
||||||
|
|
||||||
public class SctpNotificationHandler extends AbstractNotificationHandler<Object> {
|
public class SctpNotificationHandler extends AbstractNotificationHandler<Object> {
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ public class OioSctpChannel extends AbstractOioMessageChannel
|
|||||||
|
|
||||||
private final SctpChannel ch;
|
private final SctpChannel ch;
|
||||||
private final SctpChannelConfig config;
|
private final SctpChannelConfig config;
|
||||||
private final NotificationHandler notificationHandler;
|
private final NotificationHandler<?> notificationHandler;
|
||||||
|
|
||||||
private static SctpChannel openChannel() {
|
private static SctpChannel openChannel() {
|
||||||
try {
|
try {
|
||||||
|
@ -21,9 +21,7 @@ import io.netty.buffer.ChannelBufType;
|
|||||||
import io.netty.buffer.MessageBuf;
|
import io.netty.buffer.MessageBuf;
|
||||||
import io.netty.channel.ChannelException;
|
import io.netty.channel.ChannelException;
|
||||||
import io.netty.channel.ChannelMetadata;
|
import io.netty.channel.ChannelMetadata;
|
||||||
import io.netty.channel.socket.DefaultSctpChannelConfig;
|
|
||||||
import io.netty.channel.socket.DefaultSctpServerChannelConfig;
|
import io.netty.channel.socket.DefaultSctpServerChannelConfig;
|
||||||
import io.netty.channel.socket.SctpNotificationHandler;
|
|
||||||
import io.netty.channel.socket.SctpServerChannelConfig;
|
import io.netty.channel.socket.SctpServerChannelConfig;
|
||||||
import io.netty.logging.InternalLogger;
|
import io.netty.logging.InternalLogger;
|
||||||
import io.netty.logging.InternalLoggerFactory;
|
import io.netty.logging.InternalLoggerFactory;
|
||||||
|
Loading…
Reference in New Issue
Block a user