class CommandHandlerProvider implements ApplicationContextAware {

    @Nonnull
    public NewCommandSourceHandler getHandler (@Nonnull final String entity, @Nonnull final String action) {
        Preconditions.checkArgument(StringUtils.isNoneEmpty(entity), "An entity must be given!");
        Preconditions.checkArgument(StringUtils.isNoneEmpty(action), "An action must be given!");

        final String key =  entity + "|" + action;
        if (!this.registeredHandlers.containsKey(key)) {
            throw new UnsupportedCommandException(key);
        }
        return (NewCommandSourceHandler)this.applicationContext.getBean(this.registeredHandlers.get(key));
    }

      CommandHandlerProvider();

}