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

org.zodiac.sdk.simplenetty.channel.Channel Maven / Gradle / Ivy

There is a newer version: 1.6.8
Show newest version
package org.zodiac.sdk.simplenetty.channel;

import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.channels.spi.AbstractSelectableChannel;

import org.zodiac.sdk.simplenetty.concurrent.ChannelFuture;
import org.zodiac.sdk.simplenetty.concurrent.ChannelPromise;
import org.zodiac.sdk.simplenetty.core.EventLoop;
import org.zodiac.sdk.simplenetty.handler.ChannelPipeline;

public interface Channel {

    AbstractSelectableChannel javaChannel();

    EventLoop eventLoop();

    boolean isOpen();

    boolean isRegistered();

    boolean isActive();

    SocketAddress localAddress();

    SocketAddress remoteAddress();

    ChannelFuture closeFuture();

    Channel.Unsafe unsafe();

    ChannelPipeline pipeline();

    public interface Unsafe {

        SocketAddress localAddress();

        SocketAddress remoteAddress();

        void bind(SocketAddress address, ChannelPromise promise);

        void connect(SocketAddress address, ChannelPromise promise);

        // void disconnect(ChannelPromise promise);
        //
        // void close(ChannelPromise promise);
        //
        // void closeForcibly();
        //
        // void deregister(ChannelPromise promise);
        //
        // void beginRead();

        void write(ByteBuffer buffer);

        void flush();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy