public class SpringRestCommander extends Object
SpringRestCommander class is a REST controller which wires itself to listen on
'/execute' URI, or a custom configured URI (through
'com.clearlydecoded.commander.endpoint.uri' property) and execute auto-discovered
command handlers which implemente the CommandHandler interface and are injected into
the Spring Context either manually or by using Spring annotations such as Service, Component, etc.| Constructor and Description |
|---|
SpringRestCommander(org.springframework.context.ApplicationContext springContext)
Constructor.
|
SpringRestCommander(CommandHandlerRegistry commandHandlerRegistry)
Constructor.
|
public SpringRestCommander(org.springframework.context.ApplicationContext springContext)
Use this constructor unless your application needs direct access to the CommandHandlerRegistry. (Hint: in majority of cases, you don't need CommandHandlerRegistry to be available directly in Spring Context.
springContext - Spring Application Context.public SpringRestCommander(CommandHandlerRegistry commandHandlerRegistry)
Use this constructor if you manually created CommandHandlerRegistry. Usually, you
would want to do this if you manually injected CommandHandlerRegistry into Spring
Context for some reason (e.g., you want to look up registered command handlers in your own
code, outside of SpringRestCommander). To create CommandHandlerRegistry
populated with automatically discovered command handlers, use SpringCommandHandlerRegistryFactory class.
commandHandlerRegistry - Command handler registry used to look up command handlers based
on the type identifier of a command received through the REST call.Copyright © 2018. All rights reserved.