/** * creates the main cep service using details given in the configuration file * * @return - cep service * @throws org.wso2.carbon.cep.core.exception.CEPConfigurationException */ public static CEPServiceInterface createCEPService() throws CEPConfigurationException { CEPService cepService = new CEPService(); CEPServiceValueHolder.getInstance().setCepService(cepService); AxisConfiguration axisConfiguration = CEPServiceValueHolder.getInstance() .getConfigurationContextService() .getServerConfigContext() .getAxisConfiguration(); List<NotDeployedBucketElement> unDeployedBuckets = CEPServiceValueHolder.getInstance().getNotDeployedBucketElements(); for (NotDeployedBucketElement notDeployedBucketElement : unDeployedBuckets) { cepService.addBucket( BucketHelper.fromOM(notDeployedBucketElement.getBucket()), axisConfiguration, notDeployedBucketElement.getPath()); } unDeployedBuckets.clear(); return cepService; }
public static Bucket getBucket(OMElement omElement) throws CEPConfigurationException { return BucketHelper.fromOM(omElement); }
public static OMElement getOM(Bucket bucket) { return BucketHelper.bucketToOM(bucket); }