Search in sources :

Example 1 with ArtifactHolder

use of org.apache.synapse.aspects.flow.statistics.data.artifact.ArtifactHolder in project wso2-synapse by wso2.

the class StatisticSynapseConfigurationObserver method proxyServiceAdded.

@Override
public void proxyServiceAdded(ProxyService proxy) {
    ArtifactHolder holder = new ArtifactHolder();
    holder.setParent(proxy.getName());
    proxy.setComponentStatisticsId(holder);
    proxy.getAspectConfiguration().setHashCode(holder.getHashCodeAsString());
    StatisticIdentityGenerator.conclude(holder);
}
Also used : ArtifactHolder(org.apache.synapse.aspects.flow.statistics.data.artifact.ArtifactHolder)

Example 2 with ArtifactHolder

use of org.apache.synapse.aspects.flow.statistics.data.artifact.ArtifactHolder in project wso2-synapse by wso2.

the class StatisticSynapseConfigurationObserver method apiUpdated.

@Override
public void apiUpdated(API api) {
    ArtifactHolder holder = new ArtifactHolder();
    holder.setParent(api.getName());
    api.setComponentStatisticsId(holder);
    api.getAspectConfiguration().setHashCode(holder.getHashCodeAsString());
    StatisticIdentityGenerator.conclude(holder);
}
Also used : ArtifactHolder(org.apache.synapse.aspects.flow.statistics.data.artifact.ArtifactHolder)

Example 3 with ArtifactHolder

use of org.apache.synapse.aspects.flow.statistics.data.artifact.ArtifactHolder in project wso2-synapse by wso2.

the class StatisticIdentityGeneratorTest method init.

@BeforeClass
public static void init() {
    synapseConfiguration = new SynapseConfiguration();
    StatisticIdentityGenerator.setSynapseConfiguration(synapseConfiguration);
    artifactHolder = new ArtifactHolder();
    ArrayList<StructuringElement> structuringElementList = new ArrayList<>();
    structuringElement = new StructuringElement(COMPONENT_ID, ComponentType.ENDPOINT);
    structuringElementList.add(structuringElement);
    artifactHolder.setList(structuringElementList);
    artifactHolder.setParent(PARENT);
    artifactHolder.setHashCode(HASH_CODE);
    Stack<StructuringElement> structuringElementStack = new Stack<>();
    structuringElementStack.add(structuringElement);
    artifactHolder.setStack(structuringElementStack);
    artifactHolder.setId(0);
}
Also used : StructuringElement(org.apache.synapse.aspects.flow.statistics.structuring.StructuringElement) ArtifactHolder(org.apache.synapse.aspects.flow.statistics.data.artifact.ArtifactHolder) ArrayList(java.util.ArrayList) SynapseConfiguration(org.apache.synapse.config.SynapseConfiguration) Stack(java.util.Stack) BeforeClass(org.junit.BeforeClass)

Example 4 with ArtifactHolder

use of org.apache.synapse.aspects.flow.statistics.data.artifact.ArtifactHolder in project wso2-synapse by wso2.

the class StatisticSynapseConfigurationObserver method sequenceAdded.

@Override
public void sequenceAdded(Mediator sequence) {
    ArtifactHolder holder = new ArtifactHolder();
    holder.setParent(((Nameable) sequence).getName());
    sequence.setComponentStatisticsId(holder);
    ((SequenceMediator) sequence).getAspectConfiguration().setHashCode(holder.getHashCodeAsString());
    StatisticIdentityGenerator.conclude(holder);
}
Also used : ArtifactHolder(org.apache.synapse.aspects.flow.statistics.data.artifact.ArtifactHolder)

Example 5 with ArtifactHolder

use of org.apache.synapse.aspects.flow.statistics.data.artifact.ArtifactHolder in project wso2-synapse by wso2.

the class StatisticSynapseConfigurationObserver method inboundEndpointUpdated.

@Override
public void inboundEndpointUpdated(InboundEndpoint inboundEndpoint) {
    ArtifactHolder holder = new ArtifactHolder();
    holder.setParent(inboundEndpoint.getName());
    inboundEndpoint.setComponentStatisticsId(holder);
    inboundEndpoint.getAspectConfiguration().setHashCode(holder.getHashCodeAsString());
    StatisticIdentityGenerator.conclude(holder);
}
Also used : ArtifactHolder(org.apache.synapse.aspects.flow.statistics.data.artifact.ArtifactHolder)

Aggregations

ArtifactHolder (org.apache.synapse.aspects.flow.statistics.data.artifact.ArtifactHolder)6 ArrayList (java.util.ArrayList)1 Stack (java.util.Stack)1 StructuringElement (org.apache.synapse.aspects.flow.statistics.structuring.StructuringElement)1 SynapseConfiguration (org.apache.synapse.config.SynapseConfiguration)1 AbstractEndpoint (org.apache.synapse.endpoints.AbstractEndpoint)1 BeforeClass (org.junit.BeforeClass)1