org.rhq.enterprise.communications
Class GlobalConcurrencyLimitCommandListener
java.lang.Object
org.rhq.enterprise.communications.GlobalConcurrencyLimitCommandListener
- All Implemented Interfaces:
- CommandListener
public class GlobalConcurrencyLimitCommandListener
- extends Object
- implements CommandListener
This is a listener for commands coming into the ServiceContainer's CommandPreprocessor and will
immediately drop the command if the global concurrent limit has been exceeded. In other words, if we've received too
many incoming commands at the same time, we'll start dropping additional incoming commands under the command
processor can catch up.
- Author:
- John Mazzitelli
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONCURRENCY_LIMIT_NAME
public static final String CONCURRENCY_LIMIT_NAME
- See Also:
- Constant Field Values
GlobalConcurrencyLimitCommandListener
public GlobalConcurrencyLimitCommandListener(ServiceContainer serviceContainer)
receivedCommand
public void receivedCommand(Command command)
- This will be called for every command coming in. We'll check to see if we are permitted to process this command -
if we've reached the global concurrency limit, this method will throw a
NotPermittedException.
- Specified by:
receivedCommand in interface CommandListener
- Parameters:
command - the new command that was received- See Also:
CommandListener.receivedCommand(Command)
processedCommand
public void processedCommand(Command command,
CommandResponse response)
- This is called for every command that finished which includes all commands that succeeded, failed or was not
permitted due to
receivedCommand(Command) throwing a NotPermittedException.
- Specified by:
processedCommand in interface CommandListener
- Parameters:
command - the command that was received and processedresponse - the results of the command - this is being sent back to the client- See Also:
CommandListener.processedCommand(Command, CommandResponse)
Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.