Search in sources :

Example 1 with AspectConfiguration

use of org.apache.synapse.aspects.AspectConfiguration in project wso2-synapse by wso2.

the class ValidateMediator method setComponentStatisticsId.

@Override
public void setComponentStatisticsId(ArtifactHolder holder) {
    if (getAspectConfiguration() == null) {
        configure(new AspectConfiguration(getMediatorName()));
    }
    String mediatorId = StatisticIdentityGenerator.getIdForFlowContinuableMediator(getMediatorName(), ComponentType.MEDIATOR, holder);
    getAspectConfiguration().setUniqueId(mediatorId);
    StatisticIdentityGenerator.reportingFlowContinuableEndEvent(mediatorId, ComponentType.MEDIATOR, holder);
}
Also used : AspectConfiguration(org.apache.synapse.aspects.AspectConfiguration)

Example 2 with AspectConfiguration

use of org.apache.synapse.aspects.AspectConfiguration in project wso2-synapse by wso2.

the class CloneMediator method setComponentStatisticsId.

@Override
public void setComponentStatisticsId(ArtifactHolder holder) {
    if (getAspectConfiguration() == null) {
        configure(new AspectConfiguration(getMediatorName()));
    }
    String sequenceId = StatisticIdentityGenerator.getIdForFlowContinuableMediator(getMediatorName(), ComponentType.MEDIATOR, holder);
    getAspectConfiguration().setUniqueId(sequenceId);
    for (Target target : targets) {
        target.setStatisticIdForMediators(holder);
    }
    StatisticIdentityGenerator.reportingFlowContinuableEndEvent(sequenceId, ComponentType.MEDIATOR, holder);
}
Also used : Target(org.apache.synapse.mediators.eip.Target) AspectConfiguration(org.apache.synapse.aspects.AspectConfiguration)

Example 3 with AspectConfiguration

use of org.apache.synapse.aspects.AspectConfiguration in project wso2-synapse by wso2.

the class IterateMediator method setComponentStatisticsId.

@Override
public void setComponentStatisticsId(ArtifactHolder holder) {
    if (getAspectConfiguration() == null) {
        configure(new AspectConfiguration(getMediatorName()));
    }
    String mediatorId = StatisticIdentityGenerator.getIdForFlowContinuableMediator(getMediatorName(), ComponentType.MEDIATOR, holder);
    getAspectConfiguration().setUniqueId(mediatorId);
    if (target != null) {
        target.setStatisticIdForMediators(holder);
    }
    StatisticIdentityGenerator.reportingFlowContinuableEndEvent(mediatorId, ComponentType.MEDIATOR, holder);
}
Also used : AspectConfiguration(org.apache.synapse.aspects.AspectConfiguration)

Example 4 with AspectConfiguration

use of org.apache.synapse.aspects.AspectConfiguration in project wso2-synapse by wso2.

the class FilterMediator method setComponentStatisticsId.

@Override
public void setComponentStatisticsId(ArtifactHolder holder) {
    if (getAspectConfiguration() == null) {
        configure(new AspectConfiguration(getMediatorName()));
    }
    String mediatorId = StatisticIdentityGenerator.getIdForFlowContinuableMediator(getMediatorName(), ComponentType.MEDIATOR, holder);
    getAspectConfiguration().setUniqueId(mediatorId);
    String childId;
    StatisticIdentityGenerator.reportingBranchingEvents(holder);
    if (thenKey != null) {
        childId = StatisticIdentityGenerator.getIdReferencingComponent(thenKey, ComponentType.SEQUENCE, holder);
        StatisticIdentityGenerator.reportingEndEvent(childId, ComponentType.SEQUENCE, holder);
    } else {
        setStatisticIdForMediators(holder);
    }
    StatisticIdentityGenerator.reportingEndBranchingEvent(holder);
    StatisticIdentityGenerator.reportingBranchingEvents(holder);
    if (elseKey != null) {
        childId = StatisticIdentityGenerator.getIdReferencingComponent(elseKey, ComponentType.SEQUENCE, holder);
        StatisticIdentityGenerator.reportingEndEvent(childId, ComponentType.SEQUENCE, holder);
    } else if (elseMediator != null) {
        elseMediator.setStatisticIdForMediators(holder);
    }
    StatisticIdentityGenerator.reportingFlowContinuableEndEvent(mediatorId, ComponentType.MEDIATOR, holder);
    StatisticIdentityGenerator.reportingEndBranchingEvent(holder);
}
Also used : AspectConfiguration(org.apache.synapse.aspects.AspectConfiguration)

Example 5 with AspectConfiguration

use of org.apache.synapse.aspects.AspectConfiguration in project wso2-synapse by wso2.

the class OutMediator method setComponentStatisticsId.

@Override
public void setComponentStatisticsId(ArtifactHolder holder) {
    if (getAspectConfiguration() == null) {
        configure(new AspectConfiguration(getMediatorName()));
    }
    String mediatorId = StatisticIdentityGenerator.getIdForFlowContinuableMediator(getMediatorName(), ComponentType.MEDIATOR, holder);
    getAspectConfiguration().setUniqueId(mediatorId);
    setStatisticIdForMediators(holder);
    StatisticIdentityGenerator.reportingFlowContinuableEndEvent(mediatorId, ComponentType.MEDIATOR, holder);
}
Also used : AspectConfiguration(org.apache.synapse.aspects.AspectConfiguration)

Aggregations

AspectConfiguration (org.apache.synapse.aspects.AspectConfiguration)30 QName (javax.xml.namespace.QName)5 OMAttribute (org.apache.axiom.om.OMAttribute)5 Iterator (java.util.Iterator)3 OMElement (org.apache.axiom.om.OMElement)3 SynapseException (org.apache.synapse.SynapseException)3 InboundEndpoint (org.apache.synapse.inbound.InboundEndpoint)3 SequenceMediator (org.apache.synapse.mediators.base.SequenceMediator)3 RejectedExecutionException (java.util.concurrent.RejectedExecutionException)2 DropMediator (org.apache.synapse.mediators.builtin.DropMediator)2 LogMediator (org.apache.synapse.mediators.builtin.LogMediator)2 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 ArrayList (java.util.ArrayList)1 StringTokenizer (java.util.StringTokenizer)1 OMText (org.apache.axiom.om.OMText)1 OMTextImpl (org.apache.axiom.om.impl.llom.OMTextImpl)1 AxisOperation (org.apache.axis2.description.AxisOperation)1 Nameable (org.apache.synapse.Nameable)1 AspectConfigurable (org.apache.synapse.aspects.AspectConfigurable)1