public class TimedListenerManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TimedListenerManager.ListenerType |
Constructor and Description |
---|
TimedListenerManager() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Reset all packet gathering data.
|
static TimedListenerManager |
getInstance()
Retrieve the shared listener manager.
|
java.util.Date |
getStarted()
Retrieve the time the listener was started.
|
java.util.Date |
getStopped()
Retrieve the time the time listeners was stopped.
|
java.util.Set<java.lang.String> |
getTrackedPlugins()
Retrieve every tracked plugin.
|
TimedTracker |
getTracker(PacketListener listener,
TimedListenerManager.ListenerType type)
Retrieve the timed tracker associated with the given listener and listener type.
|
TimedTracker |
getTracker(org.bukkit.plugin.Plugin plugin,
TimedListenerManager.ListenerType type)
Retrieve the timed tracker associated with the given plugin and listener type.
|
TimedTracker |
getTracker(java.lang.String pluginName,
TimedListenerManager.ListenerType type)
Retrieve the timed tracker associated with the given plugin and listener type.
|
boolean |
isTiming()
Determine if we are currently timing listeners.
|
boolean |
startTiming()
Start timing listeners.
|
boolean |
stopTiming()
s
Stop timing listeners.
|
public static TimedListenerManager getInstance()
This should never change.
public boolean startTiming()
public boolean stopTiming()
public java.util.Date getStarted()
public java.util.Date getStopped()
public boolean isTiming()
public void clear()
public java.util.Set<java.lang.String> getTrackedPlugins()
public TimedTracker getTracker(org.bukkit.plugin.Plugin plugin, TimedListenerManager.ListenerType type)
plugin
- - the plugin.type
- - the listener type.public TimedTracker getTracker(PacketListener listener, TimedListenerManager.ListenerType type)
listener
- - the listener.type
- - the listener type.public TimedTracker getTracker(java.lang.String pluginName, TimedListenerManager.ListenerType type)
pluginName
- - the plugin name.type
- - the listener type.