Cleanup imports and add javadocs

This commit is contained in:
Norman Maurer 2012-09-21 22:08:12 +02:00
parent b2a3ba8154
commit a15213d751
5 changed files with 12 additions and 7 deletions

View File

@ -29,7 +29,7 @@ public final class SctpData implements SctpMessage {
private final ByteBuf payloadBuffer;
private MessageInfo msgInfo;
private final MessageInfo msgInfo;
/**
* Essential data that is being carried within SCTP Data Chunk
@ -41,6 +41,7 @@ public final class SctpData implements SctpMessage {
this.protocolIdentifier = protocolIdentifier;
this.streamIdentifier = streamIdentifier;
this.payloadBuffer = payloadBuffer;
this.msgInfo = null;
}
public SctpData(MessageInfo msgInfo, ByteBuf payloadBuffer) {

View File

@ -18,8 +18,8 @@ package io.netty.channel.socket;
import com.sun.nio.sctp.Notification;
public final class SctpNotification implements SctpMessage {
private Notification notification;
private Object attachment;
private final Notification notification;
private final Object attachment;
public SctpNotification(Notification notification, Object attachment) {
@ -27,10 +27,17 @@ public final class SctpNotification implements SctpMessage {
this.attachment = attachment;
}
/**
* Return the {@link Notification}
*/
public Notification notification() {
return notification;
}
/**
* Return the attachment of this {@link SctpNotification}, or
* <code>null</code> if no attachment was provided
*/
public Object attachment() {
return attachment;
}

View File

@ -22,7 +22,6 @@ import com.sun.nio.sctp.Notification;
import com.sun.nio.sctp.PeerAddressChangeNotification;
import com.sun.nio.sctp.SendFailedNotification;
import com.sun.nio.sctp.ShutdownNotification;
import io.netty.channel.ChannelPipeline;
public class SctpNotificationHandler extends AbstractNotificationHandler<Object> {

View File

@ -52,7 +52,7 @@ public class OioSctpChannel extends AbstractOioMessageChannel
private final SctpChannel ch;
private final SctpChannelConfig config;
private final NotificationHandler notificationHandler;
private final NotificationHandler<?> notificationHandler;
private static SctpChannel openChannel() {
try {

View File

@ -21,9 +21,7 @@ import io.netty.buffer.ChannelBufType;
import io.netty.buffer.MessageBuf;
import io.netty.channel.ChannelException;
import io.netty.channel.ChannelMetadata;
import io.netty.channel.socket.DefaultSctpChannelConfig;
import io.netty.channel.socket.DefaultSctpServerChannelConfig;
import io.netty.channel.socket.SctpNotificationHandler;
import io.netty.channel.socket.SctpServerChannelConfig;
import io.netty.logging.InternalLogger;
import io.netty.logging.InternalLoggerFactory;