S - the target ConsumerEndpointSpec implementation type.F - the target BeanNameAware implementation type.H - the target MessageHandler
implementation type.public abstract class EndpointSpec<S extends EndpointSpec<S,F,H>,F extends BeanNameAware,H> extends IntegrationComponentSpec<S,reactor.util.function.Tuple2<F,H>> implements ComponentsRegistration
IntegrationComponentSpec for endpoints.| Modifier and Type | Field and Description |
|---|---|
protected Map<Object,String> |
componentsToRegister |
protected F |
endpointFactoryBean |
protected H |
handler |
PARSER, targetloggerDEFAULT_PHASEOBJECT_TYPE_ATTRIBUTE| Modifier | Constructor and Description |
|---|---|
protected |
EndpointSpec(H handler) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertHandler() |
abstract S |
autoStartup(boolean autoStartup) |
protected reactor.util.function.Tuple2<F,H> |
doGet() |
Map<Object,String> |
getComponentsToRegister() |
S |
id(String id)
Configure the component identifier.
|
protected MessageChannel |
obtainInputChannelFromFlow(IntegrationFlow subFlow)
Try to get a
MessageChannel as an input for the provided IntegrationFlow
or create one and wrap the provided flow to a new one. |
protected MessageChannel |
obtainInputChannelFromFlow(IntegrationFlow subFlow,
boolean evaluateInternalBuilder)
Try to get a
MessageChannel as an input for the provided IntegrationFlow
or create one and wrap the provided flow to a new one. |
abstract S |
phase(int phase) |
S |
poller(java.util.function.Function<PollerFactory,PollerSpec> pollers) |
abstract S |
poller(PollerMetadata pollerMetadata) |
S |
poller(PollerSpec pollerMetadataSpec) |
abstract S |
role(String role)
Specify the role for the endpoint.
|
_this, createInstance, destroyInstance, get, getId, getObjectType, getPhase, isAutoStartup, isRunning, start, stop, stopafterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingletonprotected H handler
protected F extends BeanNameAware endpointFactoryBean
protected EndpointSpec(H handler)
public S id(String id)
IntegrationComponentSpecbeanName to register the
bean in the application context for this component.id in class IntegrationComponentSpec<S extends EndpointSpec<S,F,H>,reactor.util.function.Tuple2<F extends BeanNameAware,H>>id - the id.public S poller(java.util.function.Function<PollerFactory,PollerSpec> pollers)
pollers - the pollersAbstractPollingEndpoint,
PollerFactorypublic S poller(PollerSpec pollerMetadataSpec)
pollerMetadataSpec - the pollerMetadataSpecAbstractPollingEndpoint,
PollerSpecpublic abstract S poller(PollerMetadata pollerMetadata)
pollerMetadata - the pollerMetadataAbstractPollingEndpointpublic abstract S phase(int phase)
phase - the phase.SmartLifecyclepublic abstract S autoStartup(boolean autoStartup)
autoStartup - the autoStartup.SmartLifecyclepublic abstract S role(String role)
role - the role for this endpoint.SmartLifecycle,
SmartLifecycleRoleControllerpublic Map<Object,String> getComponentsToRegister()
getComponentsToRegister in interface ComponentsRegistrationprotected reactor.util.function.Tuple2<F,H> doGet()
doGet in class IntegrationComponentSpec<S extends EndpointSpec<S,F,H>,reactor.util.function.Tuple2<F extends BeanNameAware,H>>protected void assertHandler()
protected MessageChannel obtainInputChannelFromFlow(IntegrationFlow subFlow)
MessageChannel as an input for the provided IntegrationFlow
or create one and wrap the provided flow to a new one.subFlow - the IntegrationFlow to extract input channel.protected MessageChannel obtainInputChannelFromFlow(IntegrationFlow subFlow, boolean evaluateInternalBuilder)
MessageChannel as an input for the provided IntegrationFlow
or create one and wrap the provided flow to a new one.subFlow - the IntegrationFlow to extract input channel.evaluateInternalBuilder - true if an internal IntegrationFlowDefinition should be
evaluated to an IntegrationFlow component or left as a builder in the componentsToRegister
for future use-case. For example the builder is used for router configurations to retain beans
registration order for parent-child dependencies.