Moved sctp transport classes from io.netty.channel.socket.sctp to it's own subpackage io.netty.channel.sctp
This commit is contained in:
parent
c20d875817
commit
983a70805c
@ -19,9 +19,9 @@ import io.netty.bootstrap.Bootstrap;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelInitializer;
|
import io.netty.channel.ChannelInitializer;
|
||||||
import io.netty.channel.ChannelOption;
|
import io.netty.channel.ChannelOption;
|
||||||
import io.netty.channel.socket.sctp.SctpChannel;
|
import io.netty.channel.sctp.SctpChannel;
|
||||||
import io.netty.channel.socket.nio.NioEventLoopGroup;
|
import io.netty.channel.socket.nio.NioEventLoopGroup;
|
||||||
import io.netty.channel.socket.sctp.nio.NioSctpChannel;
|
import io.netty.channel.sctp.nio.NioSctpChannel;
|
||||||
import io.netty.handler.logging.LogLevel;
|
import io.netty.handler.logging.LogLevel;
|
||||||
import io.netty.handler.logging.LoggingHandler;
|
import io.netty.handler.logging.LoggingHandler;
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ import io.netty.bootstrap.ServerBootstrap;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelInitializer;
|
import io.netty.channel.ChannelInitializer;
|
||||||
import io.netty.channel.ChannelOption;
|
import io.netty.channel.ChannelOption;
|
||||||
import io.netty.channel.socket.sctp.SctpChannel;
|
import io.netty.channel.sctp.SctpChannel;
|
||||||
import io.netty.channel.socket.nio.NioEventLoopGroup;
|
import io.netty.channel.socket.nio.NioEventLoopGroup;
|
||||||
import io.netty.channel.socket.sctp.nio.NioSctpServerChannel;
|
import io.netty.channel.sctp.nio.NioSctpServerChannel;
|
||||||
import io.netty.handler.logging.LogLevel;
|
import io.netty.handler.logging.LogLevel;
|
||||||
import io.netty.handler.logging.LoggingHandler;
|
import io.netty.handler.logging.LoggingHandler;
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ import io.netty.bootstrap.Bootstrap;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelInitializer;
|
import io.netty.channel.ChannelInitializer;
|
||||||
import io.netty.channel.ChannelOption;
|
import io.netty.channel.ChannelOption;
|
||||||
import io.netty.channel.socket.sctp.SctpChannel;
|
import io.netty.channel.sctp.SctpChannel;
|
||||||
import io.netty.channel.socket.oio.OioEventLoopGroup;
|
import io.netty.channel.socket.oio.OioEventLoopGroup;
|
||||||
import io.netty.channel.socket.sctp.oio.OioSctpChannel;
|
import io.netty.channel.sctp.oio.OioSctpChannel;
|
||||||
import io.netty.handler.logging.LogLevel;
|
import io.netty.handler.logging.LogLevel;
|
||||||
import io.netty.handler.logging.LoggingHandler;
|
import io.netty.handler.logging.LoggingHandler;
|
||||||
|
|
||||||
|
@ -19,9 +19,9 @@ import io.netty.bootstrap.ServerBootstrap;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelInitializer;
|
import io.netty.channel.ChannelInitializer;
|
||||||
import io.netty.channel.ChannelOption;
|
import io.netty.channel.ChannelOption;
|
||||||
import io.netty.channel.socket.sctp.SctpChannel;
|
import io.netty.channel.sctp.SctpChannel;
|
||||||
import io.netty.channel.socket.oio.OioEventLoopGroup;
|
import io.netty.channel.socket.oio.OioEventLoopGroup;
|
||||||
import io.netty.channel.socket.sctp.oio.OioSctpServerChannel;
|
import io.netty.channel.sctp.oio.OioSctpServerChannel;
|
||||||
import io.netty.handler.logging.LogLevel;
|
import io.netty.handler.logging.LogLevel;
|
||||||
import io.netty.handler.logging.LoggingHandler;
|
import io.netty.handler.logging.LoggingHandler;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ import io.netty.buffer.MessageBuf;
|
|||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelInboundMessageHandlerAdapter;
|
import io.netty.channel.ChannelInboundMessageHandlerAdapter;
|
||||||
import io.netty.channel.socket.sctp.SctpMessage;
|
import io.netty.channel.sctp.SctpMessage;
|
||||||
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
@ -19,7 +19,7 @@ import io.netty.buffer.MessageBuf;
|
|||||||
import io.netty.channel.ChannelHandler.Sharable;
|
import io.netty.channel.ChannelHandler.Sharable;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelInboundMessageHandlerAdapter;
|
import io.netty.channel.ChannelInboundMessageHandlerAdapter;
|
||||||
import io.netty.channel.socket.sctp.SctpMessage;
|
import io.netty.channel.sctp.SctpMessage;
|
||||||
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
@ -13,13 +13,14 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.testsuite.transport.socket;
|
package io.netty.testsuite.transport.sctp;
|
||||||
|
|
||||||
import io.netty.bootstrap.Bootstrap;
|
import io.netty.bootstrap.Bootstrap;
|
||||||
import io.netty.bootstrap.ServerBootstrap;
|
import io.netty.bootstrap.ServerBootstrap;
|
||||||
import io.netty.logging.InternalLogger;
|
import io.netty.logging.InternalLogger;
|
||||||
import io.netty.logging.InternalLoggerFactory;
|
import io.netty.logging.InternalLoggerFactory;
|
||||||
import io.netty.testsuite.transport.socket.SocketTestPermutation.Factory;
|
import io.netty.testsuite.transport.sctp.SctpTestPermutation;
|
||||||
|
import io.netty.testsuite.transport.sctp.SctpTestPermutation.Factory;
|
||||||
import io.netty.testsuite.util.TestUtils;
|
import io.netty.testsuite.util.TestUtils;
|
||||||
import io.netty.util.NetUtil;
|
import io.netty.util.NetUtil;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
@ -34,7 +35,7 @@ import java.util.Map.Entry;
|
|||||||
public abstract class AbstractSctpTest {
|
public abstract class AbstractSctpTest {
|
||||||
|
|
||||||
private static final List<Entry<Factory<ServerBootstrap>, Factory<Bootstrap>>> COMBO =
|
private static final List<Entry<Factory<ServerBootstrap>, Factory<Bootstrap>>> COMBO =
|
||||||
SocketTestPermutation.sctpChannel();
|
SctpTestPermutation.sctpChannel();
|
||||||
|
|
||||||
@Rule
|
@Rule
|
||||||
public final TestName testName = new TestName();
|
public final TestName testName = new TestName();
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.testsuite.transport.socket;
|
package io.netty.testsuite.transport.sctp;
|
||||||
|
|
||||||
import io.netty.bootstrap.Bootstrap;
|
import io.netty.bootstrap.Bootstrap;
|
||||||
import io.netty.bootstrap.ServerBootstrap;
|
import io.netty.bootstrap.ServerBootstrap;
|
||||||
@ -23,7 +23,7 @@ import io.netty.channel.Channel;
|
|||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelInboundByteHandlerAdapter;
|
import io.netty.channel.ChannelInboundByteHandlerAdapter;
|
||||||
import io.netty.channel.ChannelInitializer;
|
import io.netty.channel.ChannelInitializer;
|
||||||
import io.netty.channel.socket.sctp.SctpChannel;
|
import io.netty.channel.sctp.SctpChannel;
|
||||||
import io.netty.handler.codec.sctp.SctpInboundByteStreamHandler;
|
import io.netty.handler.codec.sctp.SctpInboundByteStreamHandler;
|
||||||
import io.netty.handler.codec.sctp.SctpMessageCompletionHandler;
|
import io.netty.handler.codec.sctp.SctpMessageCompletionHandler;
|
||||||
import io.netty.handler.codec.sctp.SctpOutboundByteStreamHandler;
|
import io.netty.handler.codec.sctp.SctpOutboundByteStreamHandler;
|
@ -0,0 +1,127 @@
|
|||||||
|
/*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
package io.netty.testsuite.transport.sctp;
|
||||||
|
|
||||||
|
import io.netty.bootstrap.Bootstrap;
|
||||||
|
import io.netty.bootstrap.ServerBootstrap;
|
||||||
|
import io.netty.channel.sctp.nio.NioSctpChannel;
|
||||||
|
import io.netty.channel.sctp.nio.NioSctpServerChannel;
|
||||||
|
import io.netty.channel.sctp.oio.OioSctpChannel;
|
||||||
|
import io.netty.channel.sctp.oio.OioSctpServerChannel;
|
||||||
|
import io.netty.channel.socket.nio.NioEventLoopGroup;
|
||||||
|
import io.netty.channel.socket.oio.OioEventLoopGroup;
|
||||||
|
import io.netty.testsuite.util.TestUtils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class SctpTestPermutation {
|
||||||
|
|
||||||
|
|
||||||
|
static List<Factory<ServerBootstrap>> sctpServerChannel() {
|
||||||
|
if (!TestUtils.isSctpSupported()) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Factory<ServerBootstrap>> list = new ArrayList<Factory<ServerBootstrap>>();
|
||||||
|
// Make the list of ServerBootstrap factories.
|
||||||
|
list.add(new Factory<ServerBootstrap>() {
|
||||||
|
@Override
|
||||||
|
public ServerBootstrap newInstance() {
|
||||||
|
return new ServerBootstrap().
|
||||||
|
group(new NioEventLoopGroup(), new NioEventLoopGroup()).
|
||||||
|
channel(NioSctpServerChannel.class);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
list.add(new Factory<ServerBootstrap>() {
|
||||||
|
@Override
|
||||||
|
public ServerBootstrap newInstance() {
|
||||||
|
return new ServerBootstrap().
|
||||||
|
group(new OioEventLoopGroup(), new OioEventLoopGroup()).
|
||||||
|
channel(OioSctpServerChannel.class);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<Factory<Bootstrap>> sctpClientChannel() {
|
||||||
|
if (!TestUtils.isSctpSupported()) {
|
||||||
|
return Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Factory<Bootstrap>> list = new ArrayList<Factory<Bootstrap>>();
|
||||||
|
list.add(new Factory<Bootstrap>() {
|
||||||
|
@Override
|
||||||
|
public Bootstrap newInstance() {
|
||||||
|
return new Bootstrap().group(new NioEventLoopGroup()).channel(NioSctpChannel.class);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
list.add(new Factory<Bootstrap>() {
|
||||||
|
@Override
|
||||||
|
public Bootstrap newInstance() {
|
||||||
|
return new Bootstrap().group(new OioEventLoopGroup()).channel(OioSctpChannel.class);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<Map.Entry<Factory<ServerBootstrap>, Factory<Bootstrap>>> sctpChannel() {
|
||||||
|
List<Map.Entry<Factory<ServerBootstrap>, Factory<Bootstrap>>> list =
|
||||||
|
new ArrayList<Map.Entry<Factory<ServerBootstrap>, Factory<Bootstrap>>>();
|
||||||
|
|
||||||
|
// Make the list of SCTP ServerBootstrap factories.
|
||||||
|
List<Factory<ServerBootstrap>> sbfs = sctpServerChannel();
|
||||||
|
|
||||||
|
// Make the list of SCTP Bootstrap factories.
|
||||||
|
List<Factory<Bootstrap>> cbfs = sctpClientChannel();
|
||||||
|
|
||||||
|
// Populate the combinations
|
||||||
|
for (Factory<ServerBootstrap> sbf: sbfs) {
|
||||||
|
for (Factory<Bootstrap> cbf: cbfs) {
|
||||||
|
final Factory<ServerBootstrap> sbf0 = sbf;
|
||||||
|
final Factory<Bootstrap> cbf0 = cbf;
|
||||||
|
list.add(new Map.Entry<Factory<ServerBootstrap>, Factory<Bootstrap>>() {
|
||||||
|
@Override
|
||||||
|
public Factory<ServerBootstrap> getKey() {
|
||||||
|
return sbf0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Factory<Bootstrap> getValue() {
|
||||||
|
return cbf0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Factory<Bootstrap> setValue(Factory<Bootstrap> value) {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private SctpTestPermutation() {}
|
||||||
|
|
||||||
|
interface Factory<T> {
|
||||||
|
T newInstance();
|
||||||
|
}
|
||||||
|
}
|
@ -25,20 +25,14 @@ import io.netty.channel.socket.aio.AioServerSocketChannel;
|
|||||||
import io.netty.channel.socket.aio.AioSocketChannel;
|
import io.netty.channel.socket.aio.AioSocketChannel;
|
||||||
import io.netty.channel.socket.nio.NioDatagramChannel;
|
import io.netty.channel.socket.nio.NioDatagramChannel;
|
||||||
import io.netty.channel.socket.nio.NioEventLoopGroup;
|
import io.netty.channel.socket.nio.NioEventLoopGroup;
|
||||||
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.NioServerSocketChannel;
|
||||||
import io.netty.channel.socket.nio.NioSocketChannel;
|
import io.netty.channel.socket.nio.NioSocketChannel;
|
||||||
import io.netty.channel.socket.oio.OioDatagramChannel;
|
import io.netty.channel.socket.oio.OioDatagramChannel;
|
||||||
import io.netty.channel.socket.oio.OioEventLoopGroup;
|
import io.netty.channel.socket.oio.OioEventLoopGroup;
|
||||||
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.OioServerSocketChannel;
|
||||||
import io.netty.channel.socket.oio.OioSocketChannel;
|
import io.netty.channel.socket.oio.OioSocketChannel;
|
||||||
import io.netty.testsuite.util.TestUtils;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
@ -141,43 +135,6 @@ final class SocketTestPermutation {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Entry<Factory<ServerBootstrap>, Factory<Bootstrap>>> sctpChannel() {
|
|
||||||
List<Entry<Factory<ServerBootstrap>, Factory<Bootstrap>>> list =
|
|
||||||
new ArrayList<Entry<Factory<ServerBootstrap>, Factory<Bootstrap>>>();
|
|
||||||
|
|
||||||
// Make the list of SCTP ServerBootstrap factories.
|
|
||||||
List<Factory<ServerBootstrap>> sbfs = sctpServerChannel();
|
|
||||||
|
|
||||||
// Make the list of SCTP Bootstrap factories.
|
|
||||||
List<Factory<Bootstrap>> cbfs = sctpClientChannel();
|
|
||||||
|
|
||||||
// Populate the combinations
|
|
||||||
for (Factory<ServerBootstrap> sbf: sbfs) {
|
|
||||||
for (Factory<Bootstrap> cbf: cbfs) {
|
|
||||||
final Factory<ServerBootstrap> sbf0 = sbf;
|
|
||||||
final Factory<Bootstrap> cbf0 = cbf;
|
|
||||||
list.add(new Entry<Factory<ServerBootstrap>, Factory<Bootstrap>>() {
|
|
||||||
@Override
|
|
||||||
public Factory<ServerBootstrap> getKey() {
|
|
||||||
return sbf0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Factory<Bootstrap> getValue() {
|
|
||||||
return cbf0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Factory<Bootstrap> setValue(Factory<Bootstrap> value) {
|
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<Factory<ServerBootstrap>> serverSocket() {
|
static List<Factory<ServerBootstrap>> serverSocket() {
|
||||||
List<Factory<ServerBootstrap>> list = new ArrayList<Factory<ServerBootstrap>>();
|
List<Factory<ServerBootstrap>> list = new ArrayList<Factory<ServerBootstrap>>();
|
||||||
|
|
||||||
@ -234,54 +191,6 @@ final class SocketTestPermutation {
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
static List<Factory<ServerBootstrap>> sctpServerChannel() {
|
|
||||||
if (!TestUtils.isSctpSupported()) {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Factory<ServerBootstrap>> list = new ArrayList<Factory<ServerBootstrap>>();
|
|
||||||
// Make the list of ServerBootstrap factories.
|
|
||||||
list.add(new Factory<ServerBootstrap>() {
|
|
||||||
@Override
|
|
||||||
public ServerBootstrap newInstance() {
|
|
||||||
return new ServerBootstrap().
|
|
||||||
group(new NioEventLoopGroup(), new NioEventLoopGroup()).
|
|
||||||
channel(NioSctpServerChannel.class);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
list.add(new Factory<ServerBootstrap>() {
|
|
||||||
@Override
|
|
||||||
public ServerBootstrap newInstance() {
|
|
||||||
return new ServerBootstrap().
|
|
||||||
group(new OioEventLoopGroup(), new OioEventLoopGroup()).
|
|
||||||
channel(OioSctpServerChannel.class);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<Factory<Bootstrap>> sctpClientChannel() {
|
|
||||||
if (!TestUtils.isSctpSupported()) {
|
|
||||||
return Collections.emptyList();
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Factory<Bootstrap>> list = new ArrayList<Factory<Bootstrap>>();
|
|
||||||
list.add(new Factory<Bootstrap>() {
|
|
||||||
@Override
|
|
||||||
public Bootstrap newInstance() {
|
|
||||||
return new Bootstrap().group(new NioEventLoopGroup()).channel(NioSctpChannel.class);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
list.add(new Factory<Bootstrap>() {
|
|
||||||
@Override
|
|
||||||
public Bootstrap newInstance() {
|
|
||||||
return new Bootstrap().group(new OioEventLoopGroup()).channel(OioSctpChannel.class);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
private SocketTestPermutation() {}
|
private SocketTestPermutation() {}
|
||||||
|
|
||||||
interface Factory<T> {
|
interface Factory<T> {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp;
|
package io.netty.channel.sctp;
|
||||||
|
|
||||||
import com.sun.nio.sctp.SctpChannel;
|
import com.sun.nio.sctp.SctpChannel;
|
||||||
import com.sun.nio.sctp.SctpStandardSocketOptions;
|
import com.sun.nio.sctp.SctpStandardSocketOptions;
|
||||||
@ -34,7 +34,7 @@ public class DefaultSctpChannelConfig extends DefaultChannelConfig implements Sc
|
|||||||
|
|
||||||
private final SctpChannel javaChannel;
|
private final SctpChannel javaChannel;
|
||||||
|
|
||||||
public DefaultSctpChannelConfig(io.netty.channel.socket.sctp.SctpChannel channel, SctpChannel javaChannel) {
|
public DefaultSctpChannelConfig(io.netty.channel.sctp.SctpChannel channel, SctpChannel javaChannel) {
|
||||||
super(channel);
|
super(channel);
|
||||||
if (javaChannel == null) {
|
if (javaChannel == null) {
|
||||||
throw new NullPointerException("javaChannel");
|
throw new NullPointerException("javaChannel");
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp;
|
package io.netty.channel.sctp;
|
||||||
|
|
||||||
import com.sun.nio.sctp.SctpServerChannel;
|
import com.sun.nio.sctp.SctpServerChannel;
|
||||||
import io.netty.buffer.ByteBufAllocator;
|
import io.netty.buffer.ByteBufAllocator;
|
||||||
@ -39,7 +39,7 @@ public class DefaultSctpServerChannelConfig extends DefaultChannelConfig impleme
|
|||||||
* Creates a new instance.
|
* Creates a new instance.
|
||||||
*/
|
*/
|
||||||
public DefaultSctpServerChannelConfig(
|
public DefaultSctpServerChannelConfig(
|
||||||
io.netty.channel.socket.sctp.SctpServerChannel channel, SctpServerChannel javaChannel) {
|
io.netty.channel.sctp.SctpServerChannel channel, SctpServerChannel javaChannel) {
|
||||||
super(channel);
|
super(channel);
|
||||||
if (javaChannel == null) {
|
if (javaChannel == null) {
|
||||||
throw new NullPointerException("javaChannel");
|
throw new NullPointerException("javaChannel");
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp;
|
package io.netty.channel.sctp;
|
||||||
|
|
||||||
import com.sun.nio.sctp.Association;
|
import com.sun.nio.sctp.Association;
|
||||||
import io.netty.channel.Channel;
|
import io.netty.channel.Channel;
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp;
|
package io.netty.channel.sctp;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBufAllocator;
|
import io.netty.buffer.ByteBufAllocator;
|
||||||
import io.netty.channel.ChannelConfig;
|
import io.netty.channel.ChannelConfig;
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp;
|
package io.netty.channel.sctp;
|
||||||
|
|
||||||
import com.sun.nio.sctp.MessageInfo;
|
import com.sun.nio.sctp.MessageInfo;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp;
|
package io.netty.channel.sctp;
|
||||||
|
|
||||||
import com.sun.nio.sctp.Notification;
|
import com.sun.nio.sctp.Notification;
|
||||||
import io.netty.channel.ChannelHandler;
|
import io.netty.channel.ChannelHandler;
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp;
|
package io.netty.channel.sctp;
|
||||||
|
|
||||||
import com.sun.nio.sctp.AbstractNotificationHandler;
|
import com.sun.nio.sctp.AbstractNotificationHandler;
|
||||||
import com.sun.nio.sctp.AssociationChangeNotification;
|
import com.sun.nio.sctp.AssociationChangeNotification;
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp;
|
package io.netty.channel.sctp;
|
||||||
|
|
||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp;
|
package io.netty.channel.sctp;
|
||||||
|
|
||||||
import io.netty.buffer.ByteBufAllocator;
|
import io.netty.buffer.ByteBufAllocator;
|
||||||
import io.netty.channel.ChannelConfig;
|
import io.netty.channel.ChannelConfig;
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp.nio;
|
package io.netty.channel.sctp.nio;
|
||||||
|
|
||||||
import com.sun.nio.sctp.Association;
|
import com.sun.nio.sctp.Association;
|
||||||
import com.sun.nio.sctp.MessageInfo;
|
import com.sun.nio.sctp.MessageInfo;
|
||||||
@ -27,12 +27,12 @@ import io.netty.channel.ChannelException;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelMetadata;
|
import io.netty.channel.ChannelMetadata;
|
||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
|
import io.netty.channel.sctp.SctpServerChannel;
|
||||||
import io.netty.channel.socket.nio.AbstractNioMessageChannel;
|
import io.netty.channel.socket.nio.AbstractNioMessageChannel;
|
||||||
import io.netty.channel.socket.sctp.DefaultSctpChannelConfig;
|
import io.netty.channel.sctp.DefaultSctpChannelConfig;
|
||||||
import io.netty.channel.socket.sctp.SctpChannelConfig;
|
import io.netty.channel.sctp.SctpChannelConfig;
|
||||||
import io.netty.channel.socket.sctp.SctpMessage;
|
import io.netty.channel.sctp.SctpMessage;
|
||||||
import io.netty.channel.socket.sctp.SctpNotificationHandler;
|
import io.netty.channel.sctp.SctpNotificationHandler;
|
||||||
import io.netty.channel.socket.sctp.SctpServerChannel;
|
|
||||||
import io.netty.logging.InternalLogger;
|
import io.netty.logging.InternalLogger;
|
||||||
import io.netty.logging.InternalLoggerFactory;
|
import io.netty.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -49,13 +49,13 @@ import java.util.LinkedHashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link io.netty.channel.socket.sctp.SctpChannel} implementation which use non-blocking mode and allows to read /
|
* {@link io.netty.channel.sctp.SctpChannel} implementation which use non-blocking mode and allows to read /
|
||||||
* write {@link SctpMessage}s to the underlying {@link SctpChannel}.
|
* 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,
|
* 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+.
|
* 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.sctp.SctpChannel {
|
public class NioSctpChannel extends AbstractNioMessageChannel implements io.netty.channel.sctp.SctpChannel {
|
||||||
private static final ChannelMetadata METADATA = new ChannelMetadata(BufType.MESSAGE, false);
|
private static final ChannelMetadata METADATA = new ChannelMetadata(BufType.MESSAGE, false);
|
||||||
|
|
||||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(NioSctpChannel.class);
|
private static final InternalLogger logger = InternalLoggerFactory.getInstance(NioSctpChannel.class);
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp.nio;
|
package io.netty.channel.sctp.nio;
|
||||||
|
|
||||||
import com.sun.nio.sctp.SctpChannel;
|
import com.sun.nio.sctp.SctpChannel;
|
||||||
import com.sun.nio.sctp.SctpServerChannel;
|
import com.sun.nio.sctp.SctpServerChannel;
|
||||||
@ -24,8 +24,8 @@ import io.netty.channel.ChannelFuture;
|
|||||||
import io.netty.channel.ChannelMetadata;
|
import io.netty.channel.ChannelMetadata;
|
||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
import io.netty.channel.socket.nio.AbstractNioMessageChannel;
|
import io.netty.channel.socket.nio.AbstractNioMessageChannel;
|
||||||
import io.netty.channel.socket.sctp.DefaultSctpServerChannelConfig;
|
import io.netty.channel.sctp.DefaultSctpServerChannelConfig;
|
||||||
import io.netty.channel.socket.sctp.SctpServerChannelConfig;
|
import io.netty.channel.sctp.SctpServerChannelConfig;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
@ -38,14 +38,14 @@ import java.util.LinkedHashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link io.netty.channel.socket.sctp.SctpServerChannel} implementation which use non-blocking mode to accept new
|
* {@link io.netty.channel.sctp.SctpServerChannel} implementation which use non-blocking mode to accept new
|
||||||
* connections and create the {@link NioSctpChannel} for them.
|
* 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,
|
* 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+.
|
* to understand what you need to do to use it. Also this feature is only supported on Java 7+.
|
||||||
*/
|
*/
|
||||||
public class NioSctpServerChannel extends AbstractNioMessageChannel
|
public class NioSctpServerChannel extends AbstractNioMessageChannel
|
||||||
implements io.netty.channel.socket.sctp.SctpServerChannel {
|
implements io.netty.channel.sctp.SctpServerChannel {
|
||||||
private static final ChannelMetadata METADATA = new ChannelMetadata(BufType.MESSAGE, false);
|
private static final ChannelMetadata METADATA = new ChannelMetadata(BufType.MESSAGE, false);
|
||||||
|
|
||||||
private static SctpServerChannel newSocket() {
|
private static SctpServerChannel newSocket() {
|
@ -18,4 +18,4 @@
|
|||||||
* <a href="http://en.wikipedia.org/wiki/New_I/O">NIO</a>-based SCTP Channel
|
* <a href="http://en.wikipedia.org/wiki/New_I/O">NIO</a>-based SCTP Channel
|
||||||
* API implementation - recommended for a large number of connections (>= 1000).
|
* API implementation - recommended for a large number of connections (>= 1000).
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp.nio;
|
package io.netty.channel.sctp.nio;
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp.oio;
|
package io.netty.channel.sctp.oio;
|
||||||
|
|
||||||
import com.sun.nio.sctp.Association;
|
import com.sun.nio.sctp.Association;
|
||||||
import com.sun.nio.sctp.MessageInfo;
|
import com.sun.nio.sctp.MessageInfo;
|
||||||
@ -27,12 +27,12 @@ import io.netty.channel.ChannelException;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelMetadata;
|
import io.netty.channel.ChannelMetadata;
|
||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
|
import io.netty.channel.sctp.SctpServerChannel;
|
||||||
import io.netty.channel.socket.oio.AbstractOioMessageChannel;
|
import io.netty.channel.socket.oio.AbstractOioMessageChannel;
|
||||||
import io.netty.channel.socket.sctp.DefaultSctpChannelConfig;
|
import io.netty.channel.sctp.DefaultSctpChannelConfig;
|
||||||
import io.netty.channel.socket.sctp.SctpChannelConfig;
|
import io.netty.channel.sctp.SctpChannelConfig;
|
||||||
import io.netty.channel.socket.sctp.SctpMessage;
|
import io.netty.channel.sctp.SctpMessage;
|
||||||
import io.netty.channel.socket.sctp.SctpNotificationHandler;
|
import io.netty.channel.sctp.SctpNotificationHandler;
|
||||||
import io.netty.channel.socket.sctp.SctpServerChannel;
|
|
||||||
import io.netty.logging.InternalLogger;
|
import io.netty.logging.InternalLogger;
|
||||||
import io.netty.logging.InternalLoggerFactory;
|
import io.netty.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -49,14 +49,14 @@ import java.util.LinkedHashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link io.netty.channel.socket.sctp.SctpChannel} implementation which use blocking mode and allows to read / write
|
* {@link io.netty.channel.sctp.SctpChannel} implementation which use blocking mode and allows to read / write
|
||||||
* {@link SctpMessage}s to the underlying {@link SctpChannel}.
|
* {@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,
|
* 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+.
|
* to understand what you need to do to use it. Also this feature is only supported on Java 7+.
|
||||||
*/
|
*/
|
||||||
public class OioSctpChannel extends AbstractOioMessageChannel
|
public class OioSctpChannel extends AbstractOioMessageChannel
|
||||||
implements io.netty.channel.socket.sctp.SctpChannel {
|
implements io.netty.channel.sctp.SctpChannel {
|
||||||
|
|
||||||
private static final InternalLogger logger =
|
private static final InternalLogger logger =
|
||||||
InternalLoggerFactory.getInstance(OioSctpChannel.class);
|
InternalLoggerFactory.getInstance(OioSctpChannel.class);
|
@ -13,7 +13,7 @@
|
|||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp.oio;
|
package io.netty.channel.sctp.oio;
|
||||||
|
|
||||||
import com.sun.nio.sctp.SctpChannel;
|
import com.sun.nio.sctp.SctpChannel;
|
||||||
import com.sun.nio.sctp.SctpServerChannel;
|
import com.sun.nio.sctp.SctpServerChannel;
|
||||||
@ -23,9 +23,9 @@ import io.netty.channel.ChannelException;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.channel.ChannelMetadata;
|
import io.netty.channel.ChannelMetadata;
|
||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
|
import io.netty.channel.sctp.DefaultSctpServerChannelConfig;
|
||||||
|
import io.netty.channel.sctp.SctpServerChannelConfig;
|
||||||
import io.netty.channel.socket.oio.AbstractOioMessageChannel;
|
import io.netty.channel.socket.oio.AbstractOioMessageChannel;
|
||||||
import io.netty.channel.socket.sctp.DefaultSctpServerChannelConfig;
|
|
||||||
import io.netty.channel.socket.sctp.SctpServerChannelConfig;
|
|
||||||
import io.netty.logging.InternalLogger;
|
import io.netty.logging.InternalLogger;
|
||||||
import io.netty.logging.InternalLoggerFactory;
|
import io.netty.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -41,14 +41,14 @@ import java.util.LinkedHashSet;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link io.netty.channel.socket.sctp.SctpServerChannel} implementation which use blocking mode to accept new
|
* {@link io.netty.channel.sctp.SctpServerChannel} implementation which use blocking mode to accept new
|
||||||
* connections and create the {@link OioSctpChannel} for them.
|
* 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,
|
* 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+.
|
* to understand what you need to do to use it. Also this feature is only supported on Java 7+.
|
||||||
*/
|
*/
|
||||||
public class OioSctpServerChannel extends AbstractOioMessageChannel
|
public class OioSctpServerChannel extends AbstractOioMessageChannel
|
||||||
implements io.netty.channel.socket.sctp.SctpServerChannel {
|
implements io.netty.channel.sctp.SctpServerChannel {
|
||||||
|
|
||||||
private static final InternalLogger logger =
|
private static final InternalLogger logger =
|
||||||
InternalLoggerFactory.getInstance(OioSctpServerChannel.class);
|
InternalLoggerFactory.getInstance(OioSctpServerChannel.class);
|
@ -18,4 +18,4 @@
|
|||||||
* Old blocking I/O based SCTP channel API implementation - recommended for
|
* Old blocking I/O based SCTP channel API implementation - recommended for
|
||||||
* a small number of connections (< 1000).
|
* a small number of connections (< 1000).
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp.oio;
|
package io.netty.channel.sctp.oio;
|
@ -21,4 +21,4 @@
|
|||||||
* @apiviz.exclude \.socket\.[a-z]+\.
|
* @apiviz.exclude \.socket\.[a-z]+\.
|
||||||
* @apiviz.exclude \.channel\.[A-Z]
|
* @apiviz.exclude \.channel\.[A-Z]
|
||||||
*/
|
*/
|
||||||
package io.netty.channel.socket.sctp;
|
package io.netty.channel.sctp;
|
@ -19,7 +19,7 @@ package io.netty.handler.codec.sctp;
|
|||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelInboundMessageHandlerAdapter;
|
import io.netty.channel.ChannelInboundMessageHandlerAdapter;
|
||||||
import io.netty.channel.socket.sctp.SctpMessage;
|
import io.netty.channel.sctp.SctpMessage;
|
||||||
import io.netty.handler.codec.CodecException;
|
import io.netty.handler.codec.CodecException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,7 +21,7 @@ import io.netty.buffer.Unpooled;
|
|||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelInboundMessageHandler;
|
import io.netty.channel.ChannelInboundMessageHandler;
|
||||||
import io.netty.channel.ChannelInboundMessageHandlerAdapter;
|
import io.netty.channel.ChannelInboundMessageHandlerAdapter;
|
||||||
import io.netty.channel.socket.sctp.SctpMessage;
|
import io.netty.channel.sctp.SctpMessage;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
package io.netty.handler.codec.sctp;
|
package io.netty.handler.codec.sctp;
|
||||||
|
|
||||||
import io.netty.channel.socket.sctp.SctpMessage;
|
import io.netty.channel.sctp.SctpMessage;
|
||||||
import io.netty.handler.codec.CodecException;
|
import io.netty.handler.codec.CodecException;
|
||||||
import io.netty.handler.codec.MessageToMessageDecoder;
|
import io.netty.handler.codec.MessageToMessageDecoder;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ import io.netty.buffer.Unpooled;
|
|||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelOutboundByteHandlerAdapter;
|
import io.netty.channel.ChannelOutboundByteHandlerAdapter;
|
||||||
import io.netty.channel.ChannelPromise;
|
import io.netty.channel.ChannelPromise;
|
||||||
import io.netty.channel.socket.sctp.SctpMessage;
|
import io.netty.channel.sctp.SctpMessage;
|
||||||
import io.netty.handler.codec.EncoderException;
|
import io.netty.handler.codec.EncoderException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user