Interface INetworkChannel

  • All Superinterfaces:
    java.lang.AutoCloseable, IPacketSender
    All Known Implementing Classes:
    NettyNetworkChannel

    public interface INetworkChannel
    extends IPacketSender, java.lang.AutoCloseable
    A NetworkChannel instance represents an open connection
    • Method Detail

      • getChannelId

        long getChannelId()
        Returns the unique channelId. The Channel Id begins with 1 and ends with Long.MAX_VALUE
      • getServerAddress

        HostAndPort getServerAddress()
        Returns the server address from this channel
      • getClientAddress

        HostAndPort getClientAddress()
        Returns the client address from this channel
      • setHandler

        void setHandler​(INetworkChannelHandler handler)
        Sets the channel handler for the channels. That is important for the handling of receiving packets or channel closing and connect handler
        Parameters:
        handler - the handler, that should handle this channel
      • getPacketRegistry

        IPacketListenerRegistry getPacketRegistry()
        Returns the own packet listener registry. The packetRegistry is a sub registry of the network component packet listener registry
      • isClientProvidedChannel

        boolean isClientProvidedChannel()
        Returns that, the channel based of the client site connection