Package io.netty.channel

Examples of io.netty.channel.ChannelException


    private static ServerSocketChannel newSocket() {
        try {
            return ServerSocketChannel.open();
        } catch (IOException e) {
            throw new ChannelException(
                    "Failed to open a server socket.", e);
        }
    }
View Full Code Here


    private static AsynchronousSocketChannel newSocket(AsynchronousChannelGroup group) {
        try {
            return AsynchronousSocketChannel.open(group);
        } catch (IOException e) {
            throw new ChannelException("Failed to open a socket.", e);
        }
    }
View Full Code Here

    @Override
    public DatagramChannelConfig setInterface(InetAddress interfaceAddress) {
        try {
            setNetworkInterface(NetworkInterface.getByInetAddress(interfaceAddress));
        } catch (SocketException e) {
            throw new ChannelException(e);
        }
        return this;
    }
View Full Code Here

            throw new UnsupportedOperationException();
        } else {
            try {
                return GET_OPTION.invoke(javaChannel, option);
            } catch (Exception e) {
                throw new ChannelException(e);
            }
        }
    }
View Full Code Here

            throw new UnsupportedOperationException();
        } else {
            try {
                SET_OPTION.invoke(javaChannel, option, value);
            } catch (Exception e) {
                throw new ChannelException(e);
            }
        }
    }
View Full Code Here

    @Override
    public ByteBuf data() {
        try {
            return getByteBuf();
        } catch (IOException e) {
            throw new ChannelException(e);
        }
    }
View Full Code Here

            } catch (final Exception e2) {
                if (logger.isWarnEnabled()) {
                    logger.warn("Failed to close channel.", e2);
                }
            }
            throw new ChannelException("Failed to configure channel.", e);
        }
    }
View Full Code Here

            return 0;
        }

        if (receivedMessageSize >= maximumMessageSize) {
            javaChannel().close();
            throw new ChannelException(
                    "Invalid config : increase receive buffer size to avoid message truncation");
        }

        // delivers a message
        buf.add(new UdtMessage(byteBuf));
View Full Code Here

            } catch (final Exception e2) {
                if (logger.isWarnEnabled()) {
                    logger.warn("Failed to close channel.", e2);
                }
            }
            throw new ChannelException("Failed to configure channel.", e);
        }
    }
View Full Code Here

        ByteBuf buf = data();
        if (buf != null) {
            try {
                upload.setContent(buf.copy());
            } catch (IOException e) {
                throw new ChannelException(e);
            }
        }
        return upload;
    }
View Full Code Here

TOP

Related Classes of io.netty.channel.ChannelException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.