Interface NetworkComponent

All Superinterfaces:
PacketSender
All Known Subinterfaces:
NetworkClient, NetworkServer

public interface NetworkComponent extends PacketSender
Represents a peer in any form within the network.
Since:
4.0
  • Method Details

    • sslEnabled

      boolean sslEnabled()
      Get if this component has ssl enabled.
      Returns:
      true if this component has ssl enabled, false otherwise.
    • channels

      Get an immutable collection of all channels which are associated with this component.
      Returns:
      an immutable collection of all channels which are associated with this component.
    • firstChannel

      default @UnknownNullability NetworkChannel firstChannel()
      Get the first channel which is known to this component or null if no channel is present.
      Returns:
      the first channel of component or null if no channel is present.
    • packetDispatcher

      @NonNull @NonNull Executor packetDispatcher()
      Get the dispatching executor for received packets in any channel which is bound to this network component.
      Returns:
      the dispatching executor for received packets.
    • packetRegistry

      Get the packet listener registry which will be the root registry for all channels initialized by this component.
      Returns:
      the root packet registry for all associated channels.
    • closeChannels

      void closeChannels()
      Closes all open connections associated with this network component.