protected void processAuditStatus(EndpointDefinition definition ,String name , OMElement epOmElement){ if (name == null || "".equals(name)) { name = SynapseConstants.ANONYMOUS_ENDPOINT; } AspectConfiguration aspectConfiguration = new AspectConfiguration(name); definition.configure(aspectConfiguration); OMAttribute statistics = epOmElement.getAttribute( new QName(XMLConfigConstants.STATISTICS_ATTRIB_NAME)); if (statistics != null) { String statisticsValue = statistics.getAttributeValue(); if (statisticsValue != null) { if (XMLConfigConstants.STATISTICS_ENABLE.equals(statisticsValue)) { aspectConfiguration.enableStatistics(); } } } } }
protected void processAuditStatus(EndpointDefinition definition ,String name , OMElement epOmElement){ if (name == null || "".equals(name)) { name = SynapseConstants.ANONYMOUS_ENDPOINT; } AspectConfiguration aspectConfiguration = new AspectConfiguration(name); definition.configure(aspectConfiguration); OMAttribute statistics = epOmElement.getAttribute( new QName(XMLConfigConstants.STATISTICS_ATTRIB_NAME)); if (statistics != null) { String statisticsValue = statistics.getAttributeValue(); if (statisticsValue != null) { if (XMLConfigConstants.STATISTICS_ENABLE.equals(statisticsValue)) { aspectConfiguration.enableStatistics(); } } } OMAttribute tracing = epOmElement.getAttribute( new QName(XMLConfigConstants.TRACE_ATTRIB_NAME)); if (tracing != null) { String tracingValue = tracing.getAttributeValue(); if (tracingValue != null) { if (XMLConfigConstants.TRACE_ENABLE.equals(tracingValue)) { aspectConfiguration.enableTracing(); } } } } }
public void setComponentStatisticsId(ArtifactHolder holder) { if (this instanceof IndirectEndpoint) { String sequenceId = StatisticIdentityGenerator .getIdReferencingComponent(((IndirectEndpoint) (this)).getKey(), ComponentType.ENDPOINT, holder); StatisticIdentityGenerator.reportingEndEvent(sequenceId, ComponentType.ENDPOINT, holder); } else { if (definition == null) { EndpointDefinition definition = new EndpointDefinition(); this.setDefinition(definition); } if (definition.getAspectConfiguration() == null) { definition.configure(new AspectConfiguration(getReportingName())); } String sequenceId = StatisticIdentityGenerator.getIdForComponent(getReportingName(), ComponentType.ENDPOINT, holder); definition.getAspectConfiguration().setUniqueId(sequenceId); StatisticIdentityGenerator.reportingEndEvent(sequenceId, ComponentType.ENDPOINT, holder); } } }