Package org.jboss.xnio.channels

Examples of org.jboss.xnio.channels.UnsupportedOptionException


    public Key join(final InetAddress group, final NetworkInterface iface, final InetAddress source) throws IOException {
        throw new UnsupportedOperationException("Multicast join");
    }

    public <T> T getOption(final ChannelOption<T> option) throws UnsupportedOptionException, IOException {
        throw new UnsupportedOptionException("No options supported");
    }
View Full Code Here


    public Set<ChannelOption<?>> getOptions() {
        return Collections.emptySet();
    }

    public <T> Configurable setOption(final ChannelOption<T> option, final T value) throws IllegalArgumentException, IOException {
        throw new UnsupportedOptionException("No options supported");
    }
View Full Code Here

    public String toString() {
        return String.format("TCP server (NIO) <%s>", Integer.toHexString(hashCode()));
    }

    private static UnsupportedOptionException badOption(final ChannelOption<?> option) {
        return new UnsupportedOptionException("Option " + option + " is unsupported");
    }
View Full Code Here

    public void awaitWritable(final long time, final TimeUnit timeUnit) throws IOException {
        SelectorUtils.await(nioXnio, sinkChannel, SelectionKey.OP_WRITE, time, timeUnit);
    }

    public <T> T getOption(final ChannelOption<T> option) throws UnsupportedOptionException, IOException {
        throw new UnsupportedOptionException("No options supported");
    }
View Full Code Here

    public Set<ChannelOption<?>> getOptions() {
        return Collections.emptySet();
    }

    public <T> Configurable setOption(final ChannelOption<T> option, final T value) throws IllegalArgumentException, IOException {
        throw new UnsupportedOptionException("No options supported");
    }
View Full Code Here

    public void awaitWritable(final long time, final TimeUnit timeUnit) throws IOException {
        SelectorUtils.await(nioXnio, channel, SelectionKey.OP_WRITE, time, timeUnit);
    }

    public <T> T getOption(final ChannelOption<T> option) throws UnsupportedOptionException, IOException {
        throw new UnsupportedOptionException("No options supported");
    }
View Full Code Here

    public Set<ChannelOption<?>> getOptions() {
        return Collections.emptySet();
    }

    public <T> Configurable setOption(final ChannelOption<T> option, final T value) throws IllegalArgumentException, IOException {
        throw new UnsupportedOptionException("No options supported");
    }
View Full Code Here

        } else if (CommonOptions.IP_TRAFFIC_CLASS.equals(option)) {
            return option.getType().cast(trafficClass);
        } else if (CommonOptions.BROADCAST.equals(option)) {
            return option.getType().cast(broadcast);
        } else {
            throw new UnsupportedOptionException("Option not supported: " + option);
        }
    }
View Full Code Here

        return OPTIONS;
    }

    public <T> Configurable setOption(final ChannelOption<T> option, final T value) throws IllegalArgumentException, IOException {
        if (! OPTIONS.contains(option)) {
            throw new UnsupportedOptionException("Option not supported: " + option);
        }
        if (CommonOptions.RECEIVE_BUFFER.equals(option)) {
            receiveBufferSize = CommonOptions.RECEIVE_BUFFER.getType().cast(value);
            return this;
        } else if (CommonOptions.REUSE_ADDRESSES.equals(option)) {
View Full Code Here

        } else if (CommonOptions.IP_TRAFFIC_CLASS.equals(option)) {
            return option.getType().cast(trafficClass);
        } else if (CommonOptions.BROADCAST.equals(option)) {
            return option.getType().cast(broadcast);
        } else {
            throw new UnsupportedOptionException("Option not supported: " + option);
        }
    }
View Full Code Here

TOP

Related Classes of org.jboss.xnio.channels.UnsupportedOptionException

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.