Search in sources :

Example 6 with AspectConfiguration

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

the class InvokeMediator 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 7 with AspectConfiguration

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

the class CallMediator method setComponentStatisticsId.

@Override
public void setComponentStatisticsId(ArtifactHolder holder) {
    if (getAspectConfiguration() == null) {
        configure(new AspectConfiguration(getMediatorName()));
    }
    String cloneId = StatisticIdentityGenerator.getIdForComponent(getMediatorName(), ComponentType.MEDIATOR, holder);
    getAspectConfiguration().setUniqueId(cloneId);
    if (endpoint != null && !blocking) {
        endpoint.setComponentStatisticsId(holder);
    }
    StatisticIdentityGenerator.reportingEndEvent(cloneId, ComponentType.MEDIATOR, holder);
}
Also used : AspectConfiguration(org.apache.synapse.aspects.AspectConfiguration)

Example 8 with AspectConfiguration

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

the class CalloutMediator method setComponentStatisticsId.

@Override
public void setComponentStatisticsId(ArtifactHolder holder) {
    if (getAspectConfiguration() == null) {
        configure(new AspectConfiguration(getMediatorName()));
    }
    String cloneId = StatisticIdentityGenerator.getIdForComponent(getMediatorName(), ComponentType.MEDIATOR, holder);
    getAspectConfiguration().setUniqueId(cloneId);
    if (endpointKey != null) {
        String childId = StatisticIdentityGenerator.getIdReferencingComponent(endpointKey, ComponentType.ENDPOINT, holder);
        StatisticIdentityGenerator.reportingEndEvent(childId, ComponentType.ENDPOINT, holder);
    } else if (endpoint != null) {
        endpoint.setComponentStatisticsId(holder);
    }
    StatisticIdentityGenerator.reportingEndEvent(cloneId, ComponentType.MEDIATOR, holder);
}
Also used : AspectConfiguration(org.apache.synapse.aspects.AspectConfiguration)

Example 9 with AspectConfiguration

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

the class SequenceMediator method setComponentStatisticsId.

@Override
public void setComponentStatisticsId(ArtifactHolder holder) {
    String sequenceId = null;
    // if (sequenceType != SequenceType.ANON) {
    if (getAspectConfiguration() == null) {
        configure(new AspectConfiguration(name));
    }
    if (getKey() != null) {
        sequenceId = StatisticIdentityGenerator.getIdReferencingComponent(getKey().getKeyValue(), ComponentType.SEQUENCE, holder);
    } else {
        sequenceId = StatisticIdentityGenerator.getIdForFlowContinuableMediator(getSequenceNameForStatistics(), ComponentType.SEQUENCE, holder);
    }
    getAspectConfiguration().setUniqueId(sequenceId);
    // }
    setStatisticIdForMediators(holder);
    if (sequenceType != SequenceType.ANON) {
        StatisticIdentityGenerator.reportingFlowContinuableEndEvent(sequenceId, ComponentType.SEQUENCE, holder);
    }
}
Also used : AspectConfiguration(org.apache.synapse.aspects.AspectConfiguration)

Example 10 with AspectConfiguration

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

the class API method setComponentStatisticsId.

public void setComponentStatisticsId(ArtifactHolder holder) {
    if (aspectConfiguration == null) {
        aspectConfiguration = new AspectConfiguration(name);
    }
    String apiId = StatisticIdentityGenerator.getIdForComponent(name, ComponentType.API, holder);
    aspectConfiguration.setUniqueId(apiId);
    for (Resource resource : resources.values()) {
        resource.setComponentStatisticsId(holder);
    }
    StatisticIdentityGenerator.reportingEndEvent(apiId, ComponentType.API, 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