Interface DefaultNetworkComponent
-
- All Superinterfaces:
IPacketSender
- All Known Implementing Classes:
NettyNetworkClient,NettyNetworkServer
public interface DefaultNetworkComponent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidcloseChannels()java.util.Collection<INetworkChannel>getChannels()Returns all running enabled connections from the network componentdefault INetworkChannelgetFirstChannel()java.util.Collection<INetworkChannel>getModifiableChannels()java.util.concurrent.ExecutorgetPacketDispatcher()IPacketListenerRegistrygetPacketRegistry()Returns the parent packet registry from all channels, that are this network component providebooleanisSslEnabled()Returns true if the network component allows to create a ssl connectiondefault voidsendPacket(@NotNull IPacket packet)Transport a packet instance into the network to the receiver.default voidsendPacket(@NotNull IPacket... packets)Transport packet instances into the network to the receiver.default voidsendPacketSync(@NotNull IPacket packet)Transport packet instances into the network to the receiver synchronously.-
Methods inherited from interface de.dytanic.cloudnet.driver.network.protocol.IPacketSender
sendPacketSync
-
-
-
-
Method Detail
-
getModifiableChannels
java.util.Collection<INetworkChannel> getModifiableChannels()
-
closeChannels
default void closeChannels()
-
sendPacket
default void sendPacket(@NotNull @NotNull IPacket packet)Description copied from interface:IPacketSenderTransport 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 channelThe packet are doesn't allow to be null
- Specified by:
sendPacketin interfaceIPacketSender- Parameters:
packet- the packet, which should transport into the network
-
sendPacketSync
default void sendPacketSync(@NotNull @NotNull IPacket packet)Description copied from interface:IPacketSenderTransport 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 channelA packet are doesn't allow to be null All elements should be checked that be not null and send after that
- Specified by:
sendPacketSyncin interfaceIPacketSender- Parameters:
packet- the packets, which should transport into the network
-
sendPacket
default void sendPacket(@NotNull @NotNull IPacket... packets)Description copied from interface:IPacketSenderTransport packet instances into the network to the receiver. The receiver will handle the packets if he knows the channel and has listeners for the channelA packet are doesn't allow to be null All elements should be checked that be not null and send after that
- Specified by:
sendPacketin interfaceIPacketSender- 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
-
getFirstChannel
default INetworkChannel getFirstChannel()
-
getPacketDispatcher
java.util.concurrent.Executor getPacketDispatcher()
-
getPacketRegistry
IPacketListenerRegistry getPacketRegistry()
Returns the parent packet registry from all channels, that are this network component provide
-
-