public interface CommandHandlerRegistry
CommandHandlerRegistry interface defines methods for adding, removing, and retrieving
CommandHandlers based on the type of the Command.| Modifier and Type | Method and Description |
|---|---|
void |
addHandler(CommandHandler<? extends Command<? extends CommandResponse>,? extends CommandResponse> commandHandler)
Adds
commandHandler to the commandHandler registry. |
void |
addHandlers(List<? extends CommandHandler<? extends Command<? extends CommandResponse>,? extends CommandResponse>> commandHandlers)
Adds
commandHandlers to the handler registry. |
CommandHandler<? extends Command<? extends CommandResponse>,? extends CommandResponse> |
getHandlerFor(String commandType)
Retrieves concrete
CommandHandler for the type of the command. |
List<CommandHandler<? extends Command<? extends CommandResponse>,? extends CommandResponse>> |
getHandlers()
Retrieve all handlers successfully registered in the command handler registry.
|
void |
removeHandler(String commandType)
Removes command handler which handles
commandtype type of Command
from the handler registry. |
void addHandler(CommandHandler<? extends Command<? extends CommandResponse>,? extends CommandResponse> commandHandler)
commandHandler to the commandHandler registry.commandHandler - Handler to add to the commandHandler registry.void addHandlers(List<? extends CommandHandler<? extends Command<? extends CommandResponse>,? extends CommandResponse>> commandHandlers)
commandHandlers to the handler registry.commandHandlers - List of commandHandlers to add to the handler registry.CommandHandler<? extends Command<? extends CommandResponse>,? extends CommandResponse> getHandlerFor(String commandType)
CommandHandler for the type of the command. If not found, returns
null.commandType - Command type identifier that is unique system-wide.CommandHandler based
on the commandType. If no handler is found for the command type,
returns null.void removeHandler(String commandType)
commandtype type of Command
from the handler registry.commandType - Command type identifier that is unique system-wide.List<CommandHandler<? extends Command<? extends CommandResponse>,? extends CommandResponse>> getHandlers()
Copyright © 2018. All rights reserved.