Interface INetworkChannel

    • 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
      • sendQueryAsync

        de.dytanic.cloudnet.common.concurrent.ITask<IPacket> sendQueryAsync​(@NotNull
                                                                            @NotNull IPacket packet)
      • registerQueryResponseHandler

        de.dytanic.cloudnet.common.concurrent.ITask<IPacket> registerQueryResponseHandler​(java.util.UUID uniqueId)
      • sendChunkedPacketQuery

        de.dytanic.cloudnet.common.concurrent.ITask<ChunkedQueryResponse> sendChunkedPacketQuery​(@NotNull
                                                                                                 @NotNull IPacket packet)
      • sendChunkedPacketsResponse

        boolean sendChunkedPacketsResponse​(@NotNull
                                           @NotNull java.util.UUID uniqueId,
                                           @NotNull
                                           @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument header,
                                           @NotNull
                                           @NotNull java.io.InputStream inputStream)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • sendChunkedPackets

        boolean sendChunkedPackets​(@NotNull
                                   @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument header,
                                   @NotNull
                                   @NotNull java.io.InputStream inputStream,
                                   int channel)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • sendChunkedPackets

        boolean sendChunkedPackets​(java.util.UUID uniqueId,
                                   @NotNull
                                   @NotNull de.dytanic.cloudnet.common.document.gson.JsonDocument header,
                                   @NotNull
                                   @NotNull java.io.InputStream inputStream,
                                   int channel)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • isWriteable

        boolean isWriteable()
      • isActive

        boolean isActive()