Package net.timewalker.ffmq4.listeners
Class AbstractClientListener
- java.lang.Object
-
- net.timewalker.ffmq4.listeners.AbstractClientListener
-
- All Implemented Interfaces:
ClientListener
- Direct Known Subclasses:
AbstractTcpClientListener
public abstract class AbstractClientListener extends Object implements ClientListener
AbstractClientListener
-
-
Field Summary
Fields Modifier and Type Field Description protected intacceptedClientsprotected JMXAgentjmxAgentprotected net.timewalker.ffmq4.local.FFMQEnginelocalEngineprotected net.timewalker.ffmq4.utils.Settingssettingsprotected booleanstarted
-
Constructor Summary
Constructors Constructor Description AbstractClientListener(net.timewalker.ffmq4.local.FFMQEngine localEngine, net.timewalker.ffmq4.utils.Settings settings, JMXAgent jmxAgent)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcloseRemainingClients()intgetAcceptedTotal()Get the total number of clients accepted by this listener since startup or statistics resetintgetActiveClients()Get the current number of active clients for this listenerintgetDroppedTotal()Get the total number of clients dropped by this listener since startup or statistics resetStringgetEngineName()Get the associated local engine nameintgetMaxActiveClients()Get the peak number of active clients for this listener since startup or statistics resetbooleanisStarted()Test if the listener is startedprotected voidregisterClient(ClientProcessor processor)voidresetStats()Reset this listener's statisticsprotected voidunregisterClient(ClientProcessor processor)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.timewalker.ffmq4.listeners.ClientListener
getCapacity, getName, start, stop
-
-
-
-
Field Detail
-
localEngine
protected net.timewalker.ffmq4.local.FFMQEngine localEngine
-
settings
protected net.timewalker.ffmq4.utils.Settings settings
-
jmxAgent
protected JMXAgent jmxAgent
-
acceptedClients
protected int acceptedClients
-
started
protected boolean started
-
-
Constructor Detail
-
AbstractClientListener
public AbstractClientListener(net.timewalker.ffmq4.local.FFMQEngine localEngine, net.timewalker.ffmq4.utils.Settings settings, JMXAgent jmxAgent)Constructor
-
-
Method Detail
-
getEngineName
public String getEngineName()
Description copied from interface:ClientListenerGet the associated local engine name- Specified by:
getEngineNamein interfaceClientListener
-
isStarted
public boolean isStarted()
Description copied from interface:ClientListenerTest if the listener is started- Specified by:
isStartedin interfaceClientListener
-
registerClient
protected void registerClient(ClientProcessor processor)
-
unregisterClient
protected void unregisterClient(ClientProcessor processor)
-
closeRemainingClients
protected void closeRemainingClients()
-
getActiveClients
public int getActiveClients()
Description copied from interface:ClientListenerGet the current number of active clients for this listener- Specified by:
getActiveClientsin interfaceClientListener- Returns:
- the current number of active clients for this listener
-
getAcceptedTotal
public int getAcceptedTotal()
Description copied from interface:ClientListenerGet the total number of clients accepted by this listener since startup or statistics reset- Specified by:
getAcceptedTotalin interfaceClientListener- Returns:
- the total number of clients accepted by this listener
-
getDroppedTotal
public int getDroppedTotal()
Description copied from interface:ClientListenerGet the total number of clients dropped by this listener since startup or statistics reset- Specified by:
getDroppedTotalin interfaceClientListener- Returns:
- the total number of clients dropped by this listener
-
getMaxActiveClients
public int getMaxActiveClients()
Description copied from interface:ClientListenerGet the peak number of active clients for this listener since startup or statistics reset- Specified by:
getMaxActiveClientsin interfaceClientListener- Returns:
- the peak number of active clients for this listener
-
resetStats
public void resetStats()
Description copied from interface:ClientListenerReset this listener's statistics- Specified by:
resetStatsin interfaceClientListener
-
-