public class OperationMessageProcessor extends ExtensionComponent<org.mule.runtime.api.meta.model.operation.OperationModel> implements Processor, ParametersResolverProcessor, org.mule.runtime.api.metadata.EntityMetadataProvider, org.mule.runtime.api.lifecycle.Lifecycle
Processor capable of executing extension operations.
It obtains a configuration instance, evaluate all the operation parameters and executes a OperationModel by using a
operationExecutor. This message processor is capable of serving the execution of any OperationModel of any
ExtensionModel.
A operationExecutor is obtained by testing the OperationModel for a OperationExecutorModelProperty
through which a OperationExecutorFactory is obtained. Models with no such property cannot be used with this class. The
obtained OperationExecutor serve all invocations of process(Event) on this instance but will not be
shared with other instances of OperationMessageProcessor. All the Lifecycle events that this instance
receives will be propagated to the operationExecutor.
The operationExecutor is executed directly but by the means of a DefaultExecutionMediator
Before executing the operation will use the PolicyManager to lookup for a OperationPolicy that must be applied
to the operation. If there's a policy to be applied then it will interleave the operation execution with the policy logic
allowing the policy to execute logic over the operation parameters, change those parameters and then execute logic with the
operation response.
ReactiveProcessor.ProcessingTypeParametersResolverProcessor.ParametersResolverProcessorResult| Modifier and Type | Field and Description |
|---|---|
protected org.mule.runtime.module.extension.internal.runtime.operation.ReturnDelegate |
returnDelegate |
classLoader, connectionManager, extensionManager, flowConstruct, muleContext, streamingManager| Constructor and Description |
|---|
OperationMessageProcessor(org.mule.runtime.api.meta.model.ExtensionModel extensionModel,
org.mule.runtime.api.meta.model.operation.OperationModel operationModel,
org.mule.runtime.extension.api.runtime.ConfigurationProvider configurationProvider,
String target,
ResolverSet resolverSet,
CursorProviderFactory cursorProviderFactory,
ExtensionManager extensionManager,
PolicyManager policyManager) |
| Modifier and Type | Method and Description |
|---|---|
org.reactivestreams.Publisher<Event> |
apply(org.reactivestreams.Publisher<Event> publisher) |
protected ExecutionMediator |
createExecutionMediator() |
void |
disposeResolvedParameters(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.operation.OperationModel> executionContext) |
void |
doDispose()
Implementors will use this method to perform their own disposing logic
|
protected void |
doInitialise()
Implementors will use this method to perform their own initialisation logic
|
protected reactor.core.publisher.Mono<Event> |
doProcess(Event event,
ExecutionContextAdapter<org.mule.runtime.api.meta.model.operation.OperationModel> operationContext) |
void |
doStart()
Implementors will use this method to perform their own starting logic
|
void |
doStop()
Implementors will use this method to perform their own stopping logic
|
org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.MetadataKeysContainer> |
getEntityKeys() |
org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.TypeMetadataDescriptor> |
getEntityMetadata(org.mule.runtime.api.metadata.MetadataKey key) |
protected ParameterValueResolver |
getParameterValueResolver() |
ReactiveProcessor.ProcessingType |
getProcessingType() |
protected Optional<String> |
getTarget() |
Event |
process(Event event) |
ParametersResolverProcessor.ParametersResolverProcessorResult |
resolveParameters(Event event) |
protected void |
validateOperationConfiguration(org.mule.runtime.extension.api.runtime.ConfigurationProvider configurationProvider)
Validates that the
operationModel is valid for the given configurationProvider |
dispose, getConfiguration, getCursorProviderFactory, getExtensionModel, getMetadata, getMetadata, getMetadataKeys, initialise, runWithMetadataContext, setFlowConstruct, setMuleContext, start, stopgetAnnotation, getAnnotations, getLocation, setAnnotationsprotected org.mule.runtime.module.extension.internal.runtime.operation.ReturnDelegate returnDelegate
public OperationMessageProcessor(org.mule.runtime.api.meta.model.ExtensionModel extensionModel,
org.mule.runtime.api.meta.model.operation.OperationModel operationModel,
org.mule.runtime.extension.api.runtime.ConfigurationProvider configurationProvider,
String target,
ResolverSet resolverSet,
CursorProviderFactory cursorProviderFactory,
ExtensionManager extensionManager,
PolicyManager policyManager)
public org.reactivestreams.Publisher<Event> apply(org.reactivestreams.Publisher<Event> publisher)
protected reactor.core.publisher.Mono<Event> doProcess(Event event, ExecutionContextAdapter<org.mule.runtime.api.meta.model.operation.OperationModel> operationContext)
protected void doInitialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
ExtensionComponentdoInitialise in class ExtensionComponent<org.mule.runtime.api.meta.model.operation.OperationModel>org.mule.runtime.api.lifecycle.InitialisationException - if a fatal error occurs causing the Mule instance to shutdownpublic void doStart()
throws org.mule.runtime.api.exception.MuleException
ExtensionComponentdoStart in class ExtensionComponent<org.mule.runtime.api.meta.model.operation.OperationModel>org.mule.runtime.api.exception.MuleException - if the component could not startpublic void doStop()
throws org.mule.runtime.api.exception.MuleException
ExtensionComponentdoStop in class ExtensionComponent<org.mule.runtime.api.meta.model.operation.OperationModel>org.mule.runtime.api.exception.MuleException - if the component could not stoppublic void doDispose()
ExtensionComponentdoDispose in class ExtensionComponent<org.mule.runtime.api.meta.model.operation.OperationModel>public org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.MetadataKeysContainer> getEntityKeys()
throws org.mule.runtime.api.metadata.MetadataResolvingException
getEntityKeys in interface org.mule.runtime.api.metadata.EntityMetadataProviderorg.mule.runtime.api.metadata.MetadataResolvingExceptionpublic org.mule.runtime.api.metadata.resolving.MetadataResult<org.mule.runtime.api.metadata.descriptor.TypeMetadataDescriptor> getEntityMetadata(org.mule.runtime.api.metadata.MetadataKey key)
throws org.mule.runtime.api.metadata.MetadataResolvingException
getEntityMetadata in interface org.mule.runtime.api.metadata.EntityMetadataProviderorg.mule.runtime.api.metadata.MetadataResolvingExceptionprotected ExecutionMediator createExecutionMediator()
protected void validateOperationConfiguration(org.mule.runtime.extension.api.runtime.ConfigurationProvider configurationProvider)
operationModel is valid for the given configurationProvidervalidateOperationConfiguration in class ExtensionComponent<org.mule.runtime.api.meta.model.operation.OperationModel>IllegalOperationException - If the validation failsprotected ParameterValueResolver getParameterValueResolver()
getParameterValueResolver in class ExtensionComponent<org.mule.runtime.api.meta.model.operation.OperationModel>public ReactiveProcessor.ProcessingType getProcessingType()
getProcessingType in interface ReactiveProcessorpublic ParametersResolverProcessor.ParametersResolverProcessorResult resolveParameters(Event event) throws org.mule.runtime.api.exception.MuleException
resolveParameters in interface ParametersResolverProcessororg.mule.runtime.api.exception.MuleExceptionpublic void disposeResolvedParameters(org.mule.runtime.extension.api.runtime.operation.ExecutionContext<org.mule.runtime.api.meta.model.operation.OperationModel> executionContext)
disposeResolvedParameters in interface ParametersResolverProcessorCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.