public abstract class AbstractMetadataScope extends Object implements org.mule.runtime.api.lifecycle.Lifecycle
| Modifier and Type | Field and Description |
|---|---|
protected org.mule.runtime.api.component.Component |
component |
protected org.mule.runtime.api.metadata.MetadataService |
metadataService |
protected org.mule.metadata.api.TypeWriter |
metadataTypeWriter |
protected org.mule.runtime.core.privileged.PrivilegedMuleContext |
muleContext |
| Constructor and Description |
|---|
AbstractMetadataScope() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
org.mule.runtime.api.component.Component |
getComponent() |
protected org.mule.runtime.api.component.location.Location |
getComponentLocation()
Gets the
Location of the given Component |
abstract org.mule.runtime.api.message.Message |
getMetadata() |
void |
initialise() |
protected MetadataTestException |
metadataTestException(List<org.mule.runtime.api.metadata.resolving.MetadataFailure> failures,
org.mule.runtime.api.metadata.resolving.MetadataComponent expectedComponent)
Returns the
MetadataTestException to throw if the failures contain the expected MetadataComponent. |
org.mule.runtime.core.api.event.CoreEvent |
process(org.mule.runtime.core.api.event.CoreEvent incomingEvent)
Returns an event with the metadata calculated over the
component |
void |
setComponent(org.mule.runtime.api.component.Component component) |
void |
start() |
void |
stop() |
@Inject protected org.mule.runtime.core.privileged.PrivilegedMuleContext muleContext
@Named(value="_muleNonLazyMetadataService") @Inject protected org.mule.runtime.api.metadata.MetadataService metadataService
protected org.mule.metadata.api.TypeWriter metadataTypeWriter
protected org.mule.runtime.api.component.Component component
public void setComponent(org.mule.runtime.api.component.Component component)
public org.mule.runtime.api.component.Component getComponent()
public abstract org.mule.runtime.api.message.Message getMetadata()
throws MetadataTestException
MetadataTestExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppableorg.mule.runtime.api.exception.MuleExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposablepublic void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startableorg.mule.runtime.api.exception.MuleExceptionpublic void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic org.mule.runtime.core.api.event.CoreEvent process(org.mule.runtime.core.api.event.CoreEvent incomingEvent)
throws MetadataTestException
componentincomingEvent - incoming event to the scopeMetadataTestException - a failure occurred during the metadata calculationprotected org.mule.runtime.api.component.location.Location getComponentLocation()
Location of the given Componentprotected MetadataTestException metadataTestException(List<org.mule.runtime.api.metadata.resolving.MetadataFailure> failures, org.mule.runtime.api.metadata.resolving.MetadataComponent expectedComponent)
MetadataTestException to throw if the failures contain the expected MetadataComponent. If the
failures are caused by other components, an IllegalArgumentException is thrown.failures - List of failures returned by the MetadataResultexpectedComponent - Expected component that failedMetadataFailureCopyright © 2019. All rights reserved.