Interface NetworkComponent
- All Superinterfaces:
PacketSender
- All Known Subinterfaces:
NetworkClient,NetworkServer
Represents a peer in any form within the network.
- Since:
- 4.0
-
Method Summary
Modifier and TypeMethodDescriptionchannels()Get an immutable collection of all channels which are associated with this component.voidCloses all open connections associated with this network component.default @UnknownNullability NetworkChannelGet the first channel which is known to this component or null if no channel is present.Get the dispatching executor for received packets in any channel which is bound to this network component.Get the packet listener registry which will be the root registry for all channels initialized by this component.booleanGet if this component has ssl enabled.Methods inherited from interface eu.cloudnetservice.driver.network.protocol.PacketSender
sendPacket, sendPacket, sendPacketSync
-
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
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
-
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.
-