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