All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.starboot.socket.plugins.channels.UnsupportedAsynchronousSocketChannel Maven / Gradle / Ivy

/*
 *    Copyright 2019 The aio-socket Project
 *
 *    The aio-socket 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 cn.starboot.socket.plugins.channels;

import java.io.IOException;
import java.net.SocketAddress;
import java.net.SocketOption;
import java.nio.ByteBuffer;
import java.nio.channels.AsynchronousSocketChannel;
import java.nio.channels.CompletionHandler;
import java.util.Set;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;

/**
 * AIO 流控监测插件专用
 *
 * @author MDong
 * @version 2.10.1.v20211002-RELEASE
 */
public class UnsupportedAsynchronousSocketChannel extends AsynchronousSocketChannel {

    public UnsupportedAsynchronousSocketChannel(AsynchronousSocketChannel asynchronousSocketChannel) {
        super(asynchronousSocketChannel.provider());
    }

    @Override
    public AsynchronousSocketChannel bind(SocketAddress local) {
        throw new UnsupportedOperationException();
    }

    @Override
    public  AsynchronousSocketChannel setOption(SocketOption name, T value) {
        throw new UnsupportedOperationException();
    }

    @Override
    public  T getOption(SocketOption name) {
        throw new UnsupportedOperationException();
    }

    @Override
    public Set> supportedOptions() {
        throw new UnsupportedOperationException();
    }

    @Override
    public AsynchronousSocketChannel shutdownInput() {
        throw new UnsupportedOperationException();
    }

    @Override
    public AsynchronousSocketChannel shutdownOutput() {
        throw new UnsupportedOperationException();
    }

    @Override
    public SocketAddress getRemoteAddress() throws IOException {
        throw new UnsupportedOperationException();
    }

    @Override
    public  void connect(SocketAddress remote, A attachment, CompletionHandler handler) {
        throw new UnsupportedOperationException();
    }

    @Override
    public Future connect(SocketAddress remote) {
        throw new UnsupportedOperationException();
    }

    @Override
    public  void read(ByteBuffer dst, long timeout, TimeUnit unit, A attachment, CompletionHandler handler) {
        throw new UnsupportedOperationException();
    }

    @Override
    public Future read(ByteBuffer dst) {
        throw new UnsupportedOperationException();
    }

    @Override
    public  void read(ByteBuffer[] dsts, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler handler) {
        throw new UnsupportedOperationException();
    }

    @Override
    public  void write(ByteBuffer src, long timeout, TimeUnit unit, A attachment, CompletionHandler handler) {
        throw new UnsupportedOperationException();
    }

    @Override
    public Future write(ByteBuffer src) {
        throw new UnsupportedOperationException();
    }

    @Override
    public  void write(ByteBuffer[] src, int offset, int length, long timeout, TimeUnit unit, A attachment, CompletionHandler handler) {
        throw new UnsupportedOperationException();
    }

    @Override
    public SocketAddress getLocalAddress() throws IOException {
        throw new UnsupportedOperationException();
    }

    @Override
    public boolean isOpen() {
        throw new UnsupportedOperationException();
    }

    @Override
    public void close() throws IOException {
        throw new UnsupportedOperationException();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy