Class ChunkedPacketListener
- java.lang.Object
-
- de.dytanic.cloudnet.driver.network.protocol.chunk.listener.ChunkedPacketListener
-
- All Implemented Interfaces:
IPacketListener
- Direct Known Subclasses:
CachedChunkedPacketListener
public abstract class ChunkedPacketListener extends java.lang.Object implements IPacketListener
-
-
Constructor Summary
Constructors Constructor Description ChunkedPacketListener()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract @NotNull java.io.OutputStreamcreateOutputStream(@NotNull java.util.UUID sessionUniqueId, @NotNull java.util.Map<java.lang.String,java.lang.Object> properties)protected @NotNull ChunkedPacketSessioncreateSession(@NotNull INetworkChannel channel, @NotNull java.util.UUID sessionUniqueId, @NotNull java.util.Map<java.lang.String,java.lang.Object> properties)@NotNull java.util.Map<java.util.UUID,ChunkedPacketSession>getSessions()voidhandle(INetworkChannel channel, IPacket packet)Handles a new incoming packet message.protected voidhandleComplete(@NotNull ChunkedPacketSession session)
-
-
-
Method Detail
-
handle
public void handle(INetworkChannel channel, IPacket packet) throws java.lang.Exception
Description copied from interface:IPacketListenerHandles a new incoming packet message. The channel and the packet will not null- Specified by:
handlein interfaceIPacketListener- Parameters:
channel- the channel, from that the message was receivedpacket- the received packet message, which should handle from the listener- Throws:
java.lang.Exception- catch the exception, if the handle throws one
-
getSessions
@NotNull public @NotNull java.util.Map<java.util.UUID,ChunkedPacketSession> getSessions()
-
createSession
@NotNull protected @NotNull ChunkedPacketSession createSession(@NotNull @NotNull INetworkChannel channel, @NotNull @NotNull java.util.UUID sessionUniqueId, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> properties) throws java.io.IOException
- Throws:
java.io.IOException
-
createOutputStream
@NotNull protected abstract @NotNull java.io.OutputStream createOutputStream(@NotNull @NotNull java.util.UUID sessionUniqueId, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> properties) throws java.io.IOException- Throws:
java.io.IOException
-
handleComplete
protected void handleComplete(@NotNull @NotNull ChunkedPacketSession session) throws java.io.IOException- Throws:
java.io.IOException
-
-