use of org.apache.synapse.endpoints.AbstractEndpoint in project wso2-synapse by wso2.
the class StatisticSynapseConfigurationObserver method endpointAdded.
@Override
public void endpointAdded(Endpoint endpoint) {
ArtifactHolder holder = new ArtifactHolder();
holder.setParent(endpoint.getName());
endpoint.setComponentStatisticsId(holder);
((AbstractEndpoint) endpoint).getDefinition().getAspectConfiguration().setHashCode(holder.getHashCodeAsString());
StatisticIdentityGenerator.conclude(holder);
}
use of org.apache.synapse.endpoints.AbstractEndpoint in project wso2-synapse by wso2.
the class DynamicEndpointTest method testContextProperties.
public void testContextProperties() throws Exception {
SynapseXPath xpath = new SynapseXPath("$ctx:timeout");
AbstractEndpoint endpoint = new AddressEndpoint();
EndpointDefinition definition = new EndpointDefinition();
endpoint.setDefinition(definition);
definition.setDynamicTimeoutExpression(xpath);
MessageContext synCtx = new TestMessageContext();
synCtx.setProperty("timeout", "90000");
assertEquals(Long.valueOf((String) xpath.evaluate(synCtx)).longValue(), endpoint.getDefinition().evaluateDynamicEndpointTimeout(synCtx));
}
Aggregations