@NoImplement public interface SourceModel extends ConnectableComponentModel, HasNotifications
ExtensionModel
.
Source models implement the flyweight pattern. This means
that a given operation should only be represented by only
one instance of this class. Thus, if the same operation is
contained by different HasSourceModels
instances,
then each of those containers should reference the same
operation model instance.
Modifier and Type | Method and Description |
---|---|
default void |
accept(ComponentModelVisitor visitor)
Accepts a
ComponentModelVisitor |
default List<ParameterModel> |
getAllParameterModels()
Returns all the
ParameterModel on all groups, including
the ones declared on the success and error callbacks. |
Optional<SourceCallbackModel> |
getErrorCallback()
Optionally returns a
SourceCallbackModel which will listen
for errors thrown by the source owner each time it fails to process
any of the generated messages |
Optional<SourceCallbackModel> |
getSuccessCallback()
Optionally returns a
SourceCallbackModel which will listen
for the values produced by the source owner each time it successfully
processes any of the generated messages. |
Optional<SourceCallbackModel> |
getTerminateCallback()
Optionally returns a
SourceCallbackModel which will listen
for the results of every generated message. |
boolean |
hasResponse() |
boolean |
runsOnPrimaryNodeOnly() |
isTransactional, requiresConnection, supportsStreaming
getParameterGroupModels
getDescription
getNestedComponents
getName
getStereotype
getModelProperties, getModelProperty
getDisplayModel
getErrorModels
getOutput, getOutputAttributes
getNotificationModels
boolean hasResponse()
Optional<SourceCallbackModel> getSuccessCallback()
SourceCallbackModel
which will listen
for the values produced by the source owner each time it successfully
processes any of the generated messages.Optional
SourceCallbackModel
Optional<SourceCallbackModel> getErrorCallback()
SourceCallbackModel
which will listen
for errors thrown by the source owner each time it fails to process
any of the generated messagesOptional
SourceCallbackModel
Optional<SourceCallbackModel> getTerminateCallback()
SourceCallbackModel
which will listen
for the results of every generated message.
This callback will be called after the getErrorCallback()
and getSuccessCallback()
as the last step to validate the
result of the flow processing.Optional
SourceCallbackModel
boolean runsOnPrimaryNodeOnly()
default List<ParameterModel> getAllParameterModels()
ParameterModel
on all groups, including
the ones declared on the success and error callbacks.
Parameters repeated among callbacks will be deduplicated.getAllParameterModels
in interface ParameterizedModel
default void accept(ComponentModelVisitor visitor)
ComponentModelVisitor
accept
in interface ComponentModel
visitor
- a ComponentModelVisitor
Copyright © 2018. All rights reserved.