From ccb5409f581dc423a1356cbfee7b662498d16d4f Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Tue, 1 Jan 2013 09:19:00 +0100 Subject: [PATCH] [#884] Split SCTP transport into extra module --- example/pom.xml | 5 ++ .../netty/example/sctp/NioSctpEchoClient.java | 4 +- .../netty/example/sctp/NioSctpEchoServer.java | 4 +- .../netty/example/sctp/OioSctpEchoClient.java | 4 +- .../netty/example/sctp/OioSctpEchoServer.java | 4 +- .../example/sctp/SctpEchoClientHandler.java | 2 +- .../example/sctp/SctpEchoServerHandler.java | 2 +- pom.xml | 1 + testsuite/pom.xml | 5 ++ .../transport/socket/SctpEchoTest.java | 3 +- .../socket/SocketTestPermutation.java | 8 +-- transport-sctp/pom.xml | 68 +++++++++++++++++++ .../nio/sctp/AbstractNotificationHandler.java | 0 .../java/com/sun/nio/sctp/Association.java | 0 .../sctp/AssociationChangeNotification.java | 0 .../java/com/sun/nio/sctp/HandlerResult.java | 0 .../java/com/sun/nio/sctp/MessageInfo.java | 0 .../java/com/sun/nio/sctp/Notification.java | 0 .../com/sun/nio/sctp/NotificationHandler.java | 0 .../sctp/PeerAddressChangeNotification.java | 0 .../java/com/sun/nio/sctp/SctpChannel.java | 0 .../com/sun/nio/sctp/SctpServerChannel.java | 0 .../com/sun/nio/sctp/SctpSocketOption.java | 0 .../nio/sctp/SctpStandardSocketOptions.java | 0 .../sun/nio/sctp/SendFailedNotification.java | 0 .../sun/nio/sctp/ShutdownNotification.java | 0 .../UnsupportedOperatingSystemException.java | 0 .../java/com/sun/nio/sctp/package-info.java | 0 .../sctp}/DefaultSctpChannelConfig.java | 4 +- .../sctp}/DefaultSctpServerChannelConfig.java | 4 +- .../channel/socket/sctp}/SctpChannel.java | 2 +- .../socket/sctp}/SctpChannelConfig.java | 2 +- .../channel/socket/sctp}/SctpMessage.java | 2 +- .../socket/sctp}/SctpNotificationEvent.java | 2 +- .../socket/sctp}/SctpNotificationHandler.java | 2 +- .../socket/sctp}/SctpServerChannel.java | 2 +- .../socket/sctp}/SctpServerChannelConfig.java | 2 +- .../socket/sctp}/nio/NioSctpChannel.java | 17 ++--- .../sctp}/nio/NioSctpServerChannel.java | 11 +-- .../channel/socket/sctp/nio/package-info.java | 21 ++++++ .../socket/sctp}/oio/OioSctpChannel.java | 15 ++-- .../sctp}/oio/OioSctpServerChannel.java | 13 ++-- .../channel/socket/sctp/oio/package-info.java | 21 ++++++ .../channel/socket/sctp/package-info.java | 24 +++++++ .../sctp/SctpInboundByteStreamHandler.java | 2 +- .../sctp/SctpMessageCompletionHandler.java | 2 +- .../sctp/SctpMessageToMessageDecoder.java | 2 +- .../sctp/SctpOutboundByteStreamHandler.java | 2 +- .../handler/codec/sctp/package-info.java | 0 transport/pom.xml | 18 ----- .../socket/oio/AbstractOioByteChannel.java | 2 +- .../socket/oio/AbstractOioChannel.java | 4 +- .../socket/oio/AbstractOioMessageChannel.java | 2 +- 53 files changed, 209 insertions(+), 79 deletions(-) create mode 100644 transport-sctp/pom.xml rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/AbstractNotificationHandler.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/Association.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/AssociationChangeNotification.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/HandlerResult.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/MessageInfo.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/Notification.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/NotificationHandler.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/PeerAddressChangeNotification.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/SctpChannel.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/SctpServerChannel.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/SctpSocketOption.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/SctpStandardSocketOptions.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/SendFailedNotification.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/ShutdownNotification.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/UnsupportedOperatingSystemException.java (100%) rename {transport => transport-sctp}/src/main/java/com/sun/nio/sctp/package-info.java (100%) rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/DefaultSctpChannelConfig.java (97%) rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/DefaultSctpServerChannelConfig.java (97%) rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/SctpChannel.java (99%) rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/SctpChannelConfig.java (99%) rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/SctpMessage.java (99%) rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/SctpNotificationEvent.java (98%) rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/SctpNotificationHandler.java (98%) rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/SctpServerChannel.java (98%) rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/SctpServerChannelConfig.java (98%) rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/nio/NioSctpChannel.java (95%) rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/nio/NioSctpServerChannel.java (91%) create mode 100644 transport-sctp/src/main/java/io/netty/channel/socket/sctp/nio/package-info.java rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/oio/OioSctpChannel.java (96%) rename {transport/src/main/java/io/netty/channel/socket => transport-sctp/src/main/java/io/netty/channel/socket/sctp}/oio/OioSctpServerChannel.java (93%) create mode 100644 transport-sctp/src/main/java/io/netty/channel/socket/sctp/oio/package-info.java create mode 100644 transport-sctp/src/main/java/io/netty/channel/socket/sctp/package-info.java rename {codec => transport-sctp}/src/main/java/io/netty/handler/codec/sctp/SctpInboundByteStreamHandler.java (98%) rename {codec => transport-sctp}/src/main/java/io/netty/handler/codec/sctp/SctpMessageCompletionHandler.java (98%) rename {codec => transport-sctp}/src/main/java/io/netty/handler/codec/sctp/SctpMessageToMessageDecoder.java (96%) rename {codec => transport-sctp}/src/main/java/io/netty/handler/codec/sctp/SctpOutboundByteStreamHandler.java (97%) rename {codec => transport-sctp}/src/main/java/io/netty/handler/codec/sctp/package-info.java (100%) diff --git a/example/pom.xml b/example/pom.xml index cd34401cfa..e19518b7b2 100644 --- a/example/pom.xml +++ b/example/pom.xml @@ -34,6 +34,11 @@ netty-transport ${project.version} + + ${project.groupId} + netty-transport-sctp + ${project.version} + ${project.groupId} netty-handler diff --git a/example/src/main/java/io/netty/example/sctp/NioSctpEchoClient.java b/example/src/main/java/io/netty/example/sctp/NioSctpEchoClient.java index 90a9f8e740..1de459711e 100644 --- a/example/src/main/java/io/netty/example/sctp/NioSctpEchoClient.java +++ b/example/src/main/java/io/netty/example/sctp/NioSctpEchoClient.java @@ -19,9 +19,9 @@ import io.netty.bootstrap.Bootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; -import io.netty.channel.socket.SctpChannel; +import io.netty.channel.socket.sctp.SctpChannel; import io.netty.channel.socket.nio.NioEventLoopGroup; -import io.netty.channel.socket.nio.NioSctpChannel; +import io.netty.channel.socket.sctp.nio.NioSctpChannel; import io.netty.handler.logging.LogLevel; import io.netty.handler.logging.LoggingHandler; diff --git a/example/src/main/java/io/netty/example/sctp/NioSctpEchoServer.java b/example/src/main/java/io/netty/example/sctp/NioSctpEchoServer.java index 2a6a9ba280..9629d7810d 100644 --- a/example/src/main/java/io/netty/example/sctp/NioSctpEchoServer.java +++ b/example/src/main/java/io/netty/example/sctp/NioSctpEchoServer.java @@ -19,9 +19,9 @@ import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; -import io.netty.channel.socket.SctpChannel; +import io.netty.channel.socket.sctp.SctpChannel; import io.netty.channel.socket.nio.NioEventLoopGroup; -import io.netty.channel.socket.nio.NioSctpServerChannel; +import io.netty.channel.socket.sctp.nio.NioSctpServerChannel; import io.netty.handler.logging.LogLevel; import io.netty.handler.logging.LoggingHandler; diff --git a/example/src/main/java/io/netty/example/sctp/OioSctpEchoClient.java b/example/src/main/java/io/netty/example/sctp/OioSctpEchoClient.java index 0036b82091..83889c312a 100644 --- a/example/src/main/java/io/netty/example/sctp/OioSctpEchoClient.java +++ b/example/src/main/java/io/netty/example/sctp/OioSctpEchoClient.java @@ -19,9 +19,9 @@ import io.netty.bootstrap.Bootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; -import io.netty.channel.socket.SctpChannel; +import io.netty.channel.socket.sctp.SctpChannel; import io.netty.channel.socket.oio.OioEventLoopGroup; -import io.netty.channel.socket.oio.OioSctpChannel; +import io.netty.channel.socket.sctp.oio.OioSctpChannel; import io.netty.handler.logging.LogLevel; import io.netty.handler.logging.LoggingHandler; diff --git a/example/src/main/java/io/netty/example/sctp/OioSctpEchoServer.java b/example/src/main/java/io/netty/example/sctp/OioSctpEchoServer.java index efaf4cff26..69f47a44c7 100644 --- a/example/src/main/java/io/netty/example/sctp/OioSctpEchoServer.java +++ b/example/src/main/java/io/netty/example/sctp/OioSctpEchoServer.java @@ -19,9 +19,9 @@ import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; -import io.netty.channel.socket.SctpChannel; +import io.netty.channel.socket.sctp.SctpChannel; import io.netty.channel.socket.oio.OioEventLoopGroup; -import io.netty.channel.socket.oio.OioSctpServerChannel; +import io.netty.channel.socket.sctp.oio.OioSctpServerChannel; import io.netty.handler.logging.LogLevel; import io.netty.handler.logging.LoggingHandler; diff --git a/example/src/main/java/io/netty/example/sctp/SctpEchoClientHandler.java b/example/src/main/java/io/netty/example/sctp/SctpEchoClientHandler.java index c5b3f79945..a9100db000 100644 --- a/example/src/main/java/io/netty/example/sctp/SctpEchoClientHandler.java +++ b/example/src/main/java/io/netty/example/sctp/SctpEchoClientHandler.java @@ -20,7 +20,7 @@ import io.netty.buffer.MessageBuf; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundMessageHandlerAdapter; -import io.netty.channel.socket.SctpMessage; +import io.netty.channel.socket.sctp.SctpMessage; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/example/src/main/java/io/netty/example/sctp/SctpEchoServerHandler.java b/example/src/main/java/io/netty/example/sctp/SctpEchoServerHandler.java index 1041087cae..cea2616fdf 100644 --- a/example/src/main/java/io/netty/example/sctp/SctpEchoServerHandler.java +++ b/example/src/main/java/io/netty/example/sctp/SctpEchoServerHandler.java @@ -19,7 +19,7 @@ import io.netty.buffer.MessageBuf; import io.netty.channel.ChannelHandler.Sharable; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundMessageHandlerAdapter; -import io.netty.channel.socket.SctpMessage; +import io.netty.channel.socket.sctp.SctpMessage; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/pom.xml b/pom.xml index 03c451d295..9bad5c41cc 100644 --- a/pom.xml +++ b/pom.xml @@ -79,6 +79,7 @@ codec-http codec-socks transport + transport-sctp handler metrics-yammer example diff --git a/testsuite/pom.xml b/testsuite/pom.xml index 3d88214ced..5906d62416 100644 --- a/testsuite/pom.xml +++ b/testsuite/pom.xml @@ -29,6 +29,11 @@ Netty/Testsuite + + ${project.groupId} + netty-transport-sctp + ${project.version} + ${project.groupId} netty-handler diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/SctpEchoTest.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/SctpEchoTest.java index 9147d0a095..b3907ed7f6 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/SctpEchoTest.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/SctpEchoTest.java @@ -23,13 +23,12 @@ import io.netty.channel.Channel; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundByteHandlerAdapter; import io.netty.channel.ChannelInitializer; -import io.netty.channel.socket.SctpChannel; +import io.netty.channel.socket.sctp.SctpChannel; import io.netty.handler.codec.sctp.SctpInboundByteStreamHandler; import io.netty.handler.codec.sctp.SctpMessageCompletionHandler; import io.netty.handler.codec.sctp.SctpOutboundByteStreamHandler; import io.netty.testsuite.util.TestUtils; import org.junit.Assume; -import org.junit.Ignore; import org.junit.Test; import java.io.IOException; diff --git a/testsuite/src/test/java/io/netty/testsuite/transport/socket/SocketTestPermutation.java b/testsuite/src/test/java/io/netty/testsuite/transport/socket/SocketTestPermutation.java index ac6641b259..623e9a3572 100644 --- a/testsuite/src/test/java/io/netty/testsuite/transport/socket/SocketTestPermutation.java +++ b/testsuite/src/test/java/io/netty/testsuite/transport/socket/SocketTestPermutation.java @@ -25,14 +25,14 @@ import io.netty.channel.socket.aio.AioServerSocketChannel; import io.netty.channel.socket.aio.AioSocketChannel; import io.netty.channel.socket.nio.NioDatagramChannel; import io.netty.channel.socket.nio.NioEventLoopGroup; -import io.netty.channel.socket.nio.NioSctpChannel; -import io.netty.channel.socket.nio.NioSctpServerChannel; +import io.netty.channel.socket.sctp.nio.NioSctpChannel; +import io.netty.channel.socket.sctp.nio.NioSctpServerChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.channel.socket.nio.NioSocketChannel; import io.netty.channel.socket.oio.OioDatagramChannel; import io.netty.channel.socket.oio.OioEventLoopGroup; -import io.netty.channel.socket.oio.OioSctpChannel; -import io.netty.channel.socket.oio.OioSctpServerChannel; +import io.netty.channel.socket.sctp.oio.OioSctpChannel; +import io.netty.channel.socket.sctp.oio.OioSctpServerChannel; import io.netty.channel.socket.oio.OioServerSocketChannel; import io.netty.channel.socket.oio.OioSocketChannel; import io.netty.testsuite.util.TestUtils; diff --git a/transport-sctp/pom.xml b/transport-sctp/pom.xml new file mode 100644 index 0000000000..f158823f61 --- /dev/null +++ b/transport-sctp/pom.xml @@ -0,0 +1,68 @@ + + + + + 4.0.0 + + io.netty + netty-parent + 4.0.0.Beta1-SNAPSHOT + + + netty-transport-sctp + jar + + Netty/SCTP Transport + + + + ${project.groupId} + netty-buffer + ${project.version} + + + ${project.groupId} + netty-codec + ${project.version} + + + ${project.groupId} + netty-transport + ${project.version} + + + + + + + + org.apache.maven.plugins + maven-jar-plugin + + + + com/** + + + + + + + + + + diff --git a/transport/src/main/java/com/sun/nio/sctp/AbstractNotificationHandler.java b/transport-sctp/src/main/java/com/sun/nio/sctp/AbstractNotificationHandler.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/AbstractNotificationHandler.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/AbstractNotificationHandler.java diff --git a/transport/src/main/java/com/sun/nio/sctp/Association.java b/transport-sctp/src/main/java/com/sun/nio/sctp/Association.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/Association.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/Association.java diff --git a/transport/src/main/java/com/sun/nio/sctp/AssociationChangeNotification.java b/transport-sctp/src/main/java/com/sun/nio/sctp/AssociationChangeNotification.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/AssociationChangeNotification.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/AssociationChangeNotification.java diff --git a/transport/src/main/java/com/sun/nio/sctp/HandlerResult.java b/transport-sctp/src/main/java/com/sun/nio/sctp/HandlerResult.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/HandlerResult.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/HandlerResult.java diff --git a/transport/src/main/java/com/sun/nio/sctp/MessageInfo.java b/transport-sctp/src/main/java/com/sun/nio/sctp/MessageInfo.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/MessageInfo.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/MessageInfo.java diff --git a/transport/src/main/java/com/sun/nio/sctp/Notification.java b/transport-sctp/src/main/java/com/sun/nio/sctp/Notification.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/Notification.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/Notification.java diff --git a/transport/src/main/java/com/sun/nio/sctp/NotificationHandler.java b/transport-sctp/src/main/java/com/sun/nio/sctp/NotificationHandler.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/NotificationHandler.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/NotificationHandler.java diff --git a/transport/src/main/java/com/sun/nio/sctp/PeerAddressChangeNotification.java b/transport-sctp/src/main/java/com/sun/nio/sctp/PeerAddressChangeNotification.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/PeerAddressChangeNotification.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/PeerAddressChangeNotification.java diff --git a/transport/src/main/java/com/sun/nio/sctp/SctpChannel.java b/transport-sctp/src/main/java/com/sun/nio/sctp/SctpChannel.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/SctpChannel.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/SctpChannel.java diff --git a/transport/src/main/java/com/sun/nio/sctp/SctpServerChannel.java b/transport-sctp/src/main/java/com/sun/nio/sctp/SctpServerChannel.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/SctpServerChannel.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/SctpServerChannel.java diff --git a/transport/src/main/java/com/sun/nio/sctp/SctpSocketOption.java b/transport-sctp/src/main/java/com/sun/nio/sctp/SctpSocketOption.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/SctpSocketOption.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/SctpSocketOption.java diff --git a/transport/src/main/java/com/sun/nio/sctp/SctpStandardSocketOptions.java b/transport-sctp/src/main/java/com/sun/nio/sctp/SctpStandardSocketOptions.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/SctpStandardSocketOptions.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/SctpStandardSocketOptions.java diff --git a/transport/src/main/java/com/sun/nio/sctp/SendFailedNotification.java b/transport-sctp/src/main/java/com/sun/nio/sctp/SendFailedNotification.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/SendFailedNotification.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/SendFailedNotification.java diff --git a/transport/src/main/java/com/sun/nio/sctp/ShutdownNotification.java b/transport-sctp/src/main/java/com/sun/nio/sctp/ShutdownNotification.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/ShutdownNotification.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/ShutdownNotification.java diff --git a/transport/src/main/java/com/sun/nio/sctp/UnsupportedOperatingSystemException.java b/transport-sctp/src/main/java/com/sun/nio/sctp/UnsupportedOperatingSystemException.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/UnsupportedOperatingSystemException.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/UnsupportedOperatingSystemException.java diff --git a/transport/src/main/java/com/sun/nio/sctp/package-info.java b/transport-sctp/src/main/java/com/sun/nio/sctp/package-info.java similarity index 100% rename from transport/src/main/java/com/sun/nio/sctp/package-info.java rename to transport-sctp/src/main/java/com/sun/nio/sctp/package-info.java diff --git a/transport/src/main/java/io/netty/channel/socket/DefaultSctpChannelConfig.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/DefaultSctpChannelConfig.java similarity index 97% rename from transport/src/main/java/io/netty/channel/socket/DefaultSctpChannelConfig.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/DefaultSctpChannelConfig.java index d9b3da4560..65f15efbf5 100644 --- a/transport/src/main/java/io/netty/channel/socket/DefaultSctpChannelConfig.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/DefaultSctpChannelConfig.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket; +package io.netty.channel.socket.sctp; import com.sun.nio.sctp.SctpChannel; import com.sun.nio.sctp.SctpStandardSocketOptions; @@ -34,7 +34,7 @@ public class DefaultSctpChannelConfig extends DefaultChannelConfig implements Sc private final SctpChannel javaChannel; - public DefaultSctpChannelConfig(io.netty.channel.socket.SctpChannel channel, SctpChannel javaChannel) { + public DefaultSctpChannelConfig(io.netty.channel.socket.sctp.SctpChannel channel, SctpChannel javaChannel) { super(channel); if (javaChannel == null) { throw new NullPointerException("javaChannel"); diff --git a/transport/src/main/java/io/netty/channel/socket/DefaultSctpServerChannelConfig.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/DefaultSctpServerChannelConfig.java similarity index 97% rename from transport/src/main/java/io/netty/channel/socket/DefaultSctpServerChannelConfig.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/DefaultSctpServerChannelConfig.java index 0381e17c2a..fad562cdf4 100644 --- a/transport/src/main/java/io/netty/channel/socket/DefaultSctpServerChannelConfig.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/DefaultSctpServerChannelConfig.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket; +package io.netty.channel.socket.sctp; import com.sun.nio.sctp.SctpServerChannel; import io.netty.buffer.ByteBufAllocator; @@ -39,7 +39,7 @@ public class DefaultSctpServerChannelConfig extends DefaultChannelConfig impleme * Creates a new instance. */ public DefaultSctpServerChannelConfig( - io.netty.channel.socket.SctpServerChannel channel, SctpServerChannel javaChannel) { + io.netty.channel.socket.sctp.SctpServerChannel channel, SctpServerChannel javaChannel) { super(channel); if (javaChannel == null) { throw new NullPointerException("javaChannel"); diff --git a/transport/src/main/java/io/netty/channel/socket/SctpChannel.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpChannel.java similarity index 99% rename from transport/src/main/java/io/netty/channel/socket/SctpChannel.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpChannel.java index 8df521ee25..6f0fb0f726 100644 --- a/transport/src/main/java/io/netty/channel/socket/SctpChannel.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpChannel.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket; +package io.netty.channel.socket.sctp; import com.sun.nio.sctp.Association; import io.netty.channel.Channel; diff --git a/transport/src/main/java/io/netty/channel/socket/SctpChannelConfig.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpChannelConfig.java similarity index 99% rename from transport/src/main/java/io/netty/channel/socket/SctpChannelConfig.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpChannelConfig.java index da8f2359ff..72394b4a47 100644 --- a/transport/src/main/java/io/netty/channel/socket/SctpChannelConfig.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpChannelConfig.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket; +package io.netty.channel.socket.sctp; import io.netty.buffer.ByteBufAllocator; import io.netty.channel.ChannelConfig; diff --git a/transport/src/main/java/io/netty/channel/socket/SctpMessage.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpMessage.java similarity index 99% rename from transport/src/main/java/io/netty/channel/socket/SctpMessage.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpMessage.java index 1fcbc02899..9607129e37 100644 --- a/transport/src/main/java/io/netty/channel/socket/SctpMessage.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpMessage.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket; +package io.netty.channel.socket.sctp; import com.sun.nio.sctp.MessageInfo; import io.netty.buffer.ByteBuf; diff --git a/transport/src/main/java/io/netty/channel/socket/SctpNotificationEvent.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpNotificationEvent.java similarity index 98% rename from transport/src/main/java/io/netty/channel/socket/SctpNotificationEvent.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpNotificationEvent.java index 6b30cdaadc..7eedd7fad7 100644 --- a/transport/src/main/java/io/netty/channel/socket/SctpNotificationEvent.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpNotificationEvent.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket; +package io.netty.channel.socket.sctp; import com.sun.nio.sctp.Notification; import io.netty.channel.ChannelHandler; diff --git a/transport/src/main/java/io/netty/channel/socket/SctpNotificationHandler.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpNotificationHandler.java similarity index 98% rename from transport/src/main/java/io/netty/channel/socket/SctpNotificationHandler.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpNotificationHandler.java index d4ff3e960e..ff74f25a79 100644 --- a/transport/src/main/java/io/netty/channel/socket/SctpNotificationHandler.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpNotificationHandler.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket; +package io.netty.channel.socket.sctp; import com.sun.nio.sctp.AbstractNotificationHandler; import com.sun.nio.sctp.AssociationChangeNotification; diff --git a/transport/src/main/java/io/netty/channel/socket/SctpServerChannel.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpServerChannel.java similarity index 98% rename from transport/src/main/java/io/netty/channel/socket/SctpServerChannel.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpServerChannel.java index fba24c9729..b644ba2551 100644 --- a/transport/src/main/java/io/netty/channel/socket/SctpServerChannel.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpServerChannel.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket; +package io.netty.channel.socket.sctp; import io.netty.channel.ServerChannel; diff --git a/transport/src/main/java/io/netty/channel/socket/SctpServerChannelConfig.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpServerChannelConfig.java similarity index 98% rename from transport/src/main/java/io/netty/channel/socket/SctpServerChannelConfig.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpServerChannelConfig.java index 926d631908..506cac2d20 100644 --- a/transport/src/main/java/io/netty/channel/socket/SctpServerChannelConfig.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/SctpServerChannelConfig.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket; +package io.netty.channel.socket.sctp; import io.netty.buffer.ByteBufAllocator; import io.netty.channel.ChannelConfig; diff --git a/transport/src/main/java/io/netty/channel/socket/nio/NioSctpChannel.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/nio/NioSctpChannel.java similarity index 95% rename from transport/src/main/java/io/netty/channel/socket/nio/NioSctpChannel.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/nio/NioSctpChannel.java index 3b175afa7e..765f5e92c4 100644 --- a/transport/src/main/java/io/netty/channel/socket/nio/NioSctpChannel.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/nio/NioSctpChannel.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket.nio; +package io.netty.channel.socket.sctp.nio; import com.sun.nio.sctp.Association; import com.sun.nio.sctp.MessageInfo; @@ -27,10 +27,11 @@ import io.netty.channel.ChannelException; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelMetadata; import io.netty.channel.ChannelPromise; -import io.netty.channel.socket.DefaultSctpChannelConfig; -import io.netty.channel.socket.SctpChannelConfig; -import io.netty.channel.socket.SctpMessage; -import io.netty.channel.socket.SctpNotificationHandler; +import io.netty.channel.socket.nio.AbstractNioMessageChannel; +import io.netty.channel.socket.sctp.DefaultSctpChannelConfig; +import io.netty.channel.socket.sctp.SctpChannelConfig; +import io.netty.channel.socket.sctp.SctpMessage; +import io.netty.channel.socket.sctp.SctpNotificationHandler; import io.netty.logging.InternalLogger; import io.netty.logging.InternalLoggerFactory; @@ -45,13 +46,13 @@ import java.util.Iterator; import java.util.Set; /** - * {@link io.netty.channel.socket.SctpChannel} implementation which use non-blocking mode and allows to read / write - * {@link SctpMessage}s to the underlying {@link SctpChannel}. + * {@link io.netty.channel.socket.sctp.SctpChannel} implementation which use non-blocking mode and allows to read / + * write {@link SctpMessage}s to the underlying {@link SctpChannel}. * * Be aware that not all operations systems support SCTP. Please refer to the documentation of your operation system, * to understand what you need to do to use it. Also this feature is only supported on Java 7+. */ -public class NioSctpChannel extends AbstractNioMessageChannel implements io.netty.channel.socket.SctpChannel { +public class NioSctpChannel extends AbstractNioMessageChannel implements io.netty.channel.socket.sctp.SctpChannel { private static final ChannelMetadata METADATA = new ChannelMetadata(BufType.MESSAGE, false); private static final InternalLogger logger = InternalLoggerFactory.getInstance(NioSctpChannel.class); diff --git a/transport/src/main/java/io/netty/channel/socket/nio/NioSctpServerChannel.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/nio/NioSctpServerChannel.java similarity index 91% rename from transport/src/main/java/io/netty/channel/socket/nio/NioSctpServerChannel.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/nio/NioSctpServerChannel.java index 3b1294879a..710e221c4d 100644 --- a/transport/src/main/java/io/netty/channel/socket/nio/NioSctpServerChannel.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/nio/NioSctpServerChannel.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket.nio; +package io.netty.channel.socket.sctp.nio; import com.sun.nio.sctp.SctpChannel; import com.sun.nio.sctp.SctpServerChannel; @@ -21,8 +21,9 @@ import io.netty.buffer.BufType; import io.netty.buffer.MessageBuf; import io.netty.channel.ChannelException; import io.netty.channel.ChannelMetadata; -import io.netty.channel.socket.DefaultSctpServerChannelConfig; -import io.netty.channel.socket.SctpServerChannelConfig; +import io.netty.channel.socket.nio.AbstractNioMessageChannel; +import io.netty.channel.socket.sctp.DefaultSctpServerChannelConfig; +import io.netty.channel.socket.sctp.SctpServerChannelConfig; import java.io.IOException; import java.net.InetSocketAddress; @@ -34,14 +35,14 @@ import java.util.Iterator; import java.util.Set; /** - * {@link io.netty.channel.socket.SctpServerChannel} implementation which use non-blocking mode to accept new + * {@link io.netty.channel.socket.sctp.SctpServerChannel} implementation which use non-blocking mode to accept new * connections and create the {@link NioSctpChannel} for them. * * Be aware that not all operations systems support SCTP. Please refer to the documentation of your operation system, * to understand what you need to do to use it. Also this feature is only supported on Java 7+. */ public class NioSctpServerChannel extends AbstractNioMessageChannel - implements io.netty.channel.socket.SctpServerChannel { + implements io.netty.channel.socket.sctp.SctpServerChannel { private static final ChannelMetadata METADATA = new ChannelMetadata(BufType.MESSAGE, false); private static SctpServerChannel newSocket() { diff --git a/transport-sctp/src/main/java/io/netty/channel/socket/sctp/nio/package-info.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/nio/package-info.java new file mode 100644 index 0000000000..dfc4e6437a --- /dev/null +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/nio/package-info.java @@ -0,0 +1,21 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * NIO-based SCTP Channel + * API implementation - recommended for a large number of connections (>= 1000). + */ +package io.netty.channel.socket.sctp.nio; diff --git a/transport/src/main/java/io/netty/channel/socket/oio/OioSctpChannel.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/oio/OioSctpChannel.java similarity index 96% rename from transport/src/main/java/io/netty/channel/socket/oio/OioSctpChannel.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/oio/OioSctpChannel.java index 18cfae56be..11873c1d56 100755 --- a/transport/src/main/java/io/netty/channel/socket/oio/OioSctpChannel.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/oio/OioSctpChannel.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket.oio; +package io.netty.channel.socket.sctp.oio; import com.sun.nio.sctp.Association; import com.sun.nio.sctp.MessageInfo; @@ -27,10 +27,11 @@ import io.netty.channel.ChannelException; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelMetadata; import io.netty.channel.ChannelPromise; -import io.netty.channel.socket.DefaultSctpChannelConfig; -import io.netty.channel.socket.SctpChannelConfig; -import io.netty.channel.socket.SctpMessage; -import io.netty.channel.socket.SctpNotificationHandler; +import io.netty.channel.socket.oio.AbstractOioMessageChannel; +import io.netty.channel.socket.sctp.DefaultSctpChannelConfig; +import io.netty.channel.socket.sctp.SctpChannelConfig; +import io.netty.channel.socket.sctp.SctpMessage; +import io.netty.channel.socket.sctp.SctpNotificationHandler; import io.netty.logging.InternalLogger; import io.netty.logging.InternalLoggerFactory; @@ -46,14 +47,14 @@ import java.util.Iterator; import java.util.Set; /** - * {@link io.netty.channel.socket.SctpChannel} implementation which use blocking mode and allows to read / write + * {@link io.netty.channel.socket.sctp.SctpChannel} implementation which use blocking mode and allows to read / write * {@link SctpMessage}s to the underlying {@link SctpChannel}. * * Be aware that not all operations systems support SCTP. Please refer to the documentation of your operation system, * to understand what you need to do to use it. Also this feature is only supported on Java 7+. */ public class OioSctpChannel extends AbstractOioMessageChannel - implements io.netty.channel.socket.SctpChannel { + implements io.netty.channel.socket.sctp.SctpChannel { private static final InternalLogger logger = InternalLoggerFactory.getInstance(OioSctpChannel.class); diff --git a/transport/src/main/java/io/netty/channel/socket/oio/OioSctpServerChannel.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/oio/OioSctpServerChannel.java similarity index 93% rename from transport/src/main/java/io/netty/channel/socket/oio/OioSctpServerChannel.java rename to transport-sctp/src/main/java/io/netty/channel/socket/sctp/oio/OioSctpServerChannel.java index 44d0f2a382..7b765cbef5 100755 --- a/transport/src/main/java/io/netty/channel/socket/oio/OioSctpServerChannel.java +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/oio/OioSctpServerChannel.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package io.netty.channel.socket.oio; +package io.netty.channel.socket.sctp.oio; import com.sun.nio.sctp.SctpChannel; import com.sun.nio.sctp.SctpServerChannel; @@ -21,8 +21,9 @@ import io.netty.buffer.BufType; import io.netty.buffer.MessageBuf; import io.netty.channel.ChannelException; import io.netty.channel.ChannelMetadata; -import io.netty.channel.socket.DefaultSctpServerChannelConfig; -import io.netty.channel.socket.SctpServerChannelConfig; +import io.netty.channel.socket.sctp.DefaultSctpServerChannelConfig; +import io.netty.channel.socket.sctp.SctpServerChannelConfig; +import io.netty.channel.socket.oio.AbstractOioMessageChannel; import io.netty.logging.InternalLogger; import io.netty.logging.InternalLoggerFactory; @@ -37,14 +38,14 @@ import java.util.Iterator; import java.util.Set; /** - * {@link io.netty.channel.socket.SctpServerChannel} implementation which use blocking mode to accept new connections - * and create the {@link OioSctpChannel} for them. + * {@link io.netty.channel.socket.sctp.SctpServerChannel} implementation which use blocking mode to accept new + * connections and create the {@link OioSctpChannel} for them. * * Be aware that not all operations systems support SCTP. Please refer to the documentation of your operation system, * to understand what you need to do to use it. Also this feature is only supported on Java 7+. */ public class OioSctpServerChannel extends AbstractOioMessageChannel - implements io.netty.channel.socket.SctpServerChannel { + implements io.netty.channel.socket.sctp.SctpServerChannel { private static final InternalLogger logger = InternalLoggerFactory.getInstance(OioSctpServerChannel.class); diff --git a/transport-sctp/src/main/java/io/netty/channel/socket/sctp/oio/package-info.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/oio/package-info.java new file mode 100644 index 0000000000..191fd4d8f7 --- /dev/null +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/oio/package-info.java @@ -0,0 +1,21 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * Old blocking I/O based SCTP channel API implementation - recommended for + * a small number of connections (< 1000). + */ +package io.netty.channel.socket.sctp.oio; diff --git a/transport-sctp/src/main/java/io/netty/channel/socket/sctp/package-info.java b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/package-info.java new file mode 100644 index 0000000000..0ca6d099bd --- /dev/null +++ b/transport-sctp/src/main/java/io/netty/channel/socket/sctp/package-info.java @@ -0,0 +1,24 @@ +/* + * Copyright 2012 The Netty Project + * + * The Netty Project licenses this file to you under the Apache License, + * version 2.0 (the "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + */ + +/** + * Abstract SCTP socket interfaces which extend the core channel API. + * + * @apiviz.exclude \.(Abstract|Default).*$ + * @apiviz.exclude \.socket\.[a-z]+\. + * @apiviz.exclude \.channel\.[A-Z] + */ +package io.netty.channel.socket.sctp; diff --git a/codec/src/main/java/io/netty/handler/codec/sctp/SctpInboundByteStreamHandler.java b/transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpInboundByteStreamHandler.java similarity index 98% rename from codec/src/main/java/io/netty/handler/codec/sctp/SctpInboundByteStreamHandler.java rename to transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpInboundByteStreamHandler.java index cf4c0af4d8..e858345fa3 100644 --- a/codec/src/main/java/io/netty/handler/codec/sctp/SctpInboundByteStreamHandler.java +++ b/transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpInboundByteStreamHandler.java @@ -19,7 +19,7 @@ package io.netty.handler.codec.sctp; import io.netty.buffer.ByteBuf; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundMessageHandlerAdapter; -import io.netty.channel.socket.SctpMessage; +import io.netty.channel.socket.sctp.SctpMessage; import io.netty.handler.codec.CodecException; /** diff --git a/codec/src/main/java/io/netty/handler/codec/sctp/SctpMessageCompletionHandler.java b/transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpMessageCompletionHandler.java similarity index 98% rename from codec/src/main/java/io/netty/handler/codec/sctp/SctpMessageCompletionHandler.java rename to transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpMessageCompletionHandler.java index 8f0b18085a..ae64b6bfaa 100644 --- a/codec/src/main/java/io/netty/handler/codec/sctp/SctpMessageCompletionHandler.java +++ b/transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpMessageCompletionHandler.java @@ -21,7 +21,7 @@ import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelInboundMessageHandler; import io.netty.channel.ChannelInboundMessageHandlerAdapter; -import io.netty.channel.socket.SctpMessage; +import io.netty.channel.socket.sctp.SctpMessage; import java.util.HashMap; import java.util.Map; diff --git a/codec/src/main/java/io/netty/handler/codec/sctp/SctpMessageToMessageDecoder.java b/transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpMessageToMessageDecoder.java similarity index 96% rename from codec/src/main/java/io/netty/handler/codec/sctp/SctpMessageToMessageDecoder.java rename to transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpMessageToMessageDecoder.java index cfeb2c570a..d88c029997 100644 --- a/codec/src/main/java/io/netty/handler/codec/sctp/SctpMessageToMessageDecoder.java +++ b/transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpMessageToMessageDecoder.java @@ -16,7 +16,7 @@ package io.netty.handler.codec.sctp; -import io.netty.channel.socket.SctpMessage; +import io.netty.channel.socket.sctp.SctpMessage; import io.netty.handler.codec.CodecException; import io.netty.handler.codec.MessageToMessageDecoder; diff --git a/codec/src/main/java/io/netty/handler/codec/sctp/SctpOutboundByteStreamHandler.java b/transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpOutboundByteStreamHandler.java similarity index 97% rename from codec/src/main/java/io/netty/handler/codec/sctp/SctpOutboundByteStreamHandler.java rename to transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpOutboundByteStreamHandler.java index 88e0459724..747038ce17 100644 --- a/codec/src/main/java/io/netty/handler/codec/sctp/SctpOutboundByteStreamHandler.java +++ b/transport-sctp/src/main/java/io/netty/handler/codec/sctp/SctpOutboundByteStreamHandler.java @@ -21,7 +21,7 @@ import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.channel.ChannelOutboundByteHandlerAdapter; import io.netty.channel.ChannelPromise; -import io.netty.channel.socket.SctpMessage; +import io.netty.channel.socket.sctp.SctpMessage; import io.netty.handler.codec.EncoderException; /** diff --git a/codec/src/main/java/io/netty/handler/codec/sctp/package-info.java b/transport-sctp/src/main/java/io/netty/handler/codec/sctp/package-info.java similarity index 100% rename from codec/src/main/java/io/netty/handler/codec/sctp/package-info.java rename to transport-sctp/src/main/java/io/netty/handler/codec/sctp/package-info.java diff --git a/transport/pom.xml b/transport/pom.xml index 591c7f0ad4..038bc1116e 100644 --- a/transport/pom.xml +++ b/transport/pom.xml @@ -35,24 +35,6 @@ ${project.version} - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - com/** - - - - - - - diff --git a/transport/src/main/java/io/netty/channel/socket/oio/AbstractOioByteChannel.java b/transport/src/main/java/io/netty/channel/socket/oio/AbstractOioByteChannel.java index 74defe284c..fd3e2632a2 100755 --- a/transport/src/main/java/io/netty/channel/socket/oio/AbstractOioByteChannel.java +++ b/transport/src/main/java/io/netty/channel/socket/oio/AbstractOioByteChannel.java @@ -26,7 +26,7 @@ import java.io.IOException; /** * Abstract base class for OIO which reads and writes bytes from/to a Socket */ -abstract class AbstractOioByteChannel extends AbstractOioChannel { +public abstract class AbstractOioByteChannel extends AbstractOioChannel { private volatile boolean inputShutdown; diff --git a/transport/src/main/java/io/netty/channel/socket/oio/AbstractOioChannel.java b/transport/src/main/java/io/netty/channel/socket/oio/AbstractOioChannel.java index 2ac1816540..b2ac23252f 100644 --- a/transport/src/main/java/io/netty/channel/socket/oio/AbstractOioChannel.java +++ b/transport/src/main/java/io/netty/channel/socket/oio/AbstractOioChannel.java @@ -26,9 +26,9 @@ import java.net.SocketAddress; /** * Abstract base class for {@link Channel} implementations that use Old-Blocking-IO */ -abstract class AbstractOioChannel extends AbstractChannel { +public abstract class AbstractOioChannel extends AbstractChannel { - static final int SO_TIMEOUT = 1000; + protected static final int SO_TIMEOUT = 1000; private boolean readInProgress; diff --git a/transport/src/main/java/io/netty/channel/socket/oio/AbstractOioMessageChannel.java b/transport/src/main/java/io/netty/channel/socket/oio/AbstractOioMessageChannel.java index 1357c29c67..2a53d86f43 100755 --- a/transport/src/main/java/io/netty/channel/socket/oio/AbstractOioMessageChannel.java +++ b/transport/src/main/java/io/netty/channel/socket/oio/AbstractOioMessageChannel.java @@ -24,7 +24,7 @@ import java.io.IOException; /** * Abstract base class for OIO which reads and writes objects from/to a Socket */ -abstract class AbstractOioMessageChannel extends AbstractOioChannel { +public abstract class AbstractOioMessageChannel extends AbstractOioChannel { /** * @see AbstractOioChannel#AbstractOioChannel(Channel, Integer)