Interface DefaultNetworkComponent

    • Method Detail

      • getModifiableChannels

        java.util.Collection<INetworkChannel> getModifiableChannels()
      • closeChannels

        default void closeChannels()
      • sendPacket

        default void sendPacket​(@NotNull
                                @NotNull IPacket packet)
        Description copied from interface: IPacketSender
        Transport a packet instance into the network to the receiver. The receiver will handle the packet if he knows the channel and has listeners for the channel

        The packet are doesn't allow to be null

        Specified by:
        sendPacket in interface IPacketSender
        Parameters:
        packet - the packet, which should transport into the network
      • sendPacketSync

        default void sendPacketSync​(@NotNull
                                    @NotNull IPacket packet)
        Description copied from interface: IPacketSender
        Transport packet instances into the network to the receiver synchronously. The receiver will handle the packets if he knows the channel and has listeners for the channel

        A packet are doesn't allow to be null All elements should be checked that be not null and send after that

        Specified by:
        sendPacketSync in interface IPacketSender
        Parameters:
        packet - the packets, which should transport into the network
      • sendPacket

        default void sendPacket​(@NotNull
                                @NotNull IPacket... packets)
        Description copied from interface: IPacketSender
        Transport packet instances into the network to the receiver. The receiver will handle the packets if he knows the channel and has listeners for the channel

        A packet are doesn't allow to be null All elements should be checked that be not null and send after that

        Specified by:
        sendPacket in interface IPacketSender
        Parameters:
        packets - the packets, which should transport into the network
      • isSslEnabled

        boolean isSslEnabled()
        Returns true if the network component allows to create a ssl connection
      • getChannels

        java.util.Collection<INetworkChannel> getChannels()
        Returns all running enabled connections from the network component
      • getPacketDispatcher

        java.util.concurrent.Executor getPacketDispatcher()
      • getPacketRegistry

        IPacketListenerRegistry getPacketRegistry()
        Returns the parent packet registry from all channels, that are this network component provide