use of org.wso2.carbon.apimgt.gateway.handlers.streaming.webhook.WebhooksAnalyticsDataProvider in project carbon-apimgt by wso2.
the class WebhooksUtils method publishAnalyticsData.
public static void publishAnalyticsData(MessageContext messageContext) {
org.apache.axis2.context.MessageContext axisCtx = ((Axis2MessageContext) messageContext).getAxis2MessageContext();
axisCtx.setProperty(PassThroughConstants.SYNAPSE_ARTIFACT_TYPE, APIConstants.API_TYPE_WEBSUB);
WebhooksAnalyticsDataProvider provider = new WebhooksAnalyticsDataProvider(messageContext);
GenericRequestDataCollector dataCollector = new GenericRequestDataCollector(provider);
try {
dataCollector.collectData();
} catch (AnalyticsException e) {
log.error("Error occurred when collecting data", e);
}
}
Aggregations