public interface AsynchronousManager
Modifier and Type | Method and Description |
---|---|
void |
cleanupAll()
Remove listeners, close threads and transmit every delayed packet.
|
java.util.logging.Logger |
getLogger()
Retrieve the default error logger.
|
PacketStream |
getPacketStream()
Retrieve the default packet stream.
|
java.util.Set<java.lang.Integer> |
getReceivingFilters()
Retrieves a immutable set containing the ID of the recieved client packets that will be
observed by the asynchronous listeners.
|
java.util.Set<java.lang.Integer> |
getSendingFilters()
Retrieves a immutable set containing the ID of the sent server packets that will be
observed by the asynchronous listeners.
|
boolean |
hasAsynchronousListeners(PacketEvent packet)
Determine if a given synchronous packet has asynchronous listeners.
|
AsyncListenerHandler |
registerAsyncHandler(PacketListener listener)
Registers an asynchronous packet handler.
|
void |
unregisterAsyncHandler(AsyncListenerHandler handler)
Unregisters and closes the given asynchronous handler.
|
void |
unregisterAsyncHandlers(org.bukkit.plugin.Plugin plugin)
Unregisters every asynchronous handler associated with this plugin.
|
AsyncListenerHandler registerAsyncHandler(PacketListener listener)
To start listening asynchronously, pass the getListenerLoop() runnable to a different thread.
listener
- - the packet listener that will recieve these asynchronous events.void unregisterAsyncHandler(AsyncListenerHandler handler)
handler
- - asynchronous handler.void unregisterAsyncHandlers(org.bukkit.plugin.Plugin plugin)
plugin
- - the original plugin.java.util.Set<java.lang.Integer> getSendingFilters()
java.util.Set<java.lang.Integer> getReceivingFilters()
boolean hasAsynchronousListeners(PacketEvent packet)
packet
- - packet to test.PacketStream getPacketStream()
java.util.logging.Logger getLogger()
void cleanupAll()