Interface CommandExecutorPool.CommandHandler
- Enclosing class:
CommandExecutorPool
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for command execution.
The handler receives a CommandContext and must: 1. Execute the message via appropriate handler 2. Write the response via connection.send() if response is non-null 3. Handle exceptions gracefully (don't rethrow unless truly unrecoverable)
Exceptions thrown by the handler are caught and logged; command execution continues.
- Since:
- 1.0
-
Method Summary
-
Method Details
-
execute
Execute a single command.- Parameters:
ctx- the command context (non-null)- Throws:
Exception- if execution fails (will be caught and logged)
-