Package org.infinispan.objectfilter.impl.predicateindex

Examples of org.infinispan.objectfilter.impl.predicateindex.Predicates$Subscription


                DatatypeFactory df = DatatypeFactory.newInstance();
                try {

                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                        data.value = new ArrayList<Subscription>();
                        Subscription sub = new Subscription();
                        sub.setBrief(false);
                        sub.setExpiresAfter(null);
                        sub.setMaxEntities(null);
                        sub.setNotificationInterval(null);
                        sub.setBindingKey(null);
                        sub.setSubscriptionFilter(new SubscriptionFilter());
                        sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
                        sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
                        sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                        sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name("%", null));
                        sub.getSubscriptionFilter().setFindService(new FindService());
                        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
                        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                        sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));

                        data.value.add(sub);

                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
                        Assert.fail();
View Full Code Here


                try {

                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                        data.value = new ArrayList<Subscription>();
                        Subscription sub = new Subscription();
                        sub.setBrief(true);
                        sub.setExpiresAfter(null);
                        sub.setMaxEntities(null);
                        sub.setNotificationInterval(null);
                        sub.setBindingKey(null);
                        sub.setSubscriptionFilter(new SubscriptionFilter());
                        sub.getSubscriptionFilter().setFindService(new FindService());
                        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
                        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                        sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
                        data.value.add(sub);

                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
                        Assert.assertNotNull(data.value.get(0).getExpiresAfter());
                        XMLGregorianCalendar xcal = data.value.get(0).getExpiresAfter();
View Full Code Here

                try {

                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                        data.value = new ArrayList<Subscription>();
                        Subscription sub = new Subscription();
                        sub.setBrief(true);
                        sub.setExpiresAfter(null);
                        sub.setMaxEntities(null);
                        sub.setNotificationInterval(df.newDuration(5000));
                        sub.setBindingKey("uddi:uddi.joepublisher.com:mykey");
                        sub.setSubscriptionFilter(new SubscriptionFilter());
                        sub.getSubscriptionFilter().setFindService(new FindService());
                        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
                        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                        sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
                        data.value.add(sub);

                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
                        Assert.fail();
                } catch (Exception ex) {
View Full Code Here

                        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
                        tckBindingTemplateJoe.saveJoePublisherBinding(authInfoJoe);

                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                        data.value = new ArrayList<Subscription>();
                        Subscription sub = new Subscription();
                        sub.setBrief(true);
                        sub.setExpiresAfter(null);
                        sub.setMaxEntities(null);
                        sub.setNotificationInterval(null);
                        sub.setBindingKey(TckBindingTemplate.JOE_BINDING_KEY);
                        sub.setSubscriptionFilter(new SubscriptionFilter());
                        sub.getSubscriptionFilter().setFindService(new FindService());
                        sub.getSubscriptionFilter().getFindService().setFindQualifiers(new FindQualifiers());
                        sub.getSubscriptionFilter().getFindService().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                        sub.getSubscriptionFilter().getFindService().getName().add(new Name("%", null));
                        data.value.add(sub);

                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
                        Assert.fail();
                } catch (Exception ex) {
View Full Code Here

                DatatypeFactory df = DatatypeFactory.newInstance();
                try {

                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                        data.value = new ArrayList<Subscription>();
                        Subscription sub = new Subscription();
                        sub.setBrief(false);
                        sub.setExpiresAfter(null);
                        sub.setMaxEntities(null);
                        sub.setNotificationInterval(null);
                        sub.setBindingKey(null);
                        sub.setSubscriptionFilter(new SubscriptionFilter());
                        sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
                        sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
                        sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                        sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name("%", null));
                        data.value.add(sub);

                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
                        SaveBusiness sb = new SaveBusiness();
                        sb.setAuthInfo(authInfoJoe);
View Full Code Here

                        tckBusinessServiceJoe.saveJoePublisherService(authInfoJoe);
                        tckBindingTemplateJoe.saveJoePublisherBinding(authInfoJoe);

                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                        data.value = new ArrayList<Subscription>();
                        Subscription sub = new Subscription();
                        sub.setBrief(false);
                        sub.setExpiresAfter(null);
                        sub.setMaxEntities(null);
                        sub.setNotificationInterval(null);
                        sub.setBindingKey(null);
                        sub.setSubscriptionFilter(new SubscriptionFilter());
                        sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
                        sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
                        sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                        sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name("%", null));
                        data.value.add(sub);

                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
                        SaveBusiness sb = new SaveBusiness();
                        sb.setAuthInfo(authInfoJoe);
View Full Code Here

                DatatypeFactory df = DatatypeFactory.newInstance();
                try {

                        Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                        data.value = new ArrayList<Subscription>();
                        Subscription sub = new Subscription();
                        sub.setBrief(false);
                        sub.setExpiresAfter(null);
                        sub.setMaxEntities(null);
                        sub.setNotificationInterval(null);
                        sub.setBindingKey(null);
                        sub.setSubscriptionFilter(new SubscriptionFilter());
                        sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
                        sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
                        sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                        sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name("%", null));
                        data.value.add(sub);

                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
                        SaveBusiness sb = new SaveBusiness();
                        sb.setAuthInfo(authInfoJoe);
View Full Code Here

                }

                //register for callbacks
                SubscriptionCallbackListener.registerCallback(this);

                Subscription sub = new Subscription();

                sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(1000));
                sub.setBindingKey(start.getBindingKey());
                sub.setSubscriptionFilter(new SubscriptionFilter());
                sub.getSubscriptionFilter().setFindBusiness(new FindBusiness());
                sub.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
                sub.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                sub.getSubscriptionFilter().getFindBusiness().getName().add(new Name(UDDIConstants.WILDCARD, null));

                Subscription subscription = clerk.register(sub, clerk.getUDDINode().getApiNode());
                if (TckCommon.isDebug()) {
                        PrintUDDI<Subscription> p2 = new PrintUDDI<Subscription>();
                        logger.info(p2.print(subscription));
                }
                Assert.assertNotNull(subscription);
                Assert.assertNotNull(subscription.getBindingKey());
                Assert.assertNotNull(subscription.getSubscriptionKey());
                logger.info("Registered subscription key: " + (subscription.getSubscriptionKey()) + " bindingkey: " + subscription.getBindingKey());

                //fetch the business just to verify binding registration
                BusinessEntity businessDetail = clerk.getBusinessDetail("uddi:somebusiness:somebusinesskey");
                Assert.assertNotNull(businessDetail);
                Assert.assertNotNull(businessDetail.getBusinessKey());
                Assert.assertNotNull(businessDetail.getBusinessServices());
                Assert.assertNotNull(businessDetail.getBusinessServices().getBusinessService().get(0));
                Assert.assertNotNull(businessDetail.getBusinessServices().getBusinessService().get(0).getBindingTemplates());
                Assert.assertNotNull(businessDetail.getBusinessServices().getBusinessService().get(0).getBindingTemplates().getBindingTemplate().get(0));
                if (TckCommon.isDebug()) {
                        PrintUDDI<BusinessEntity> p2 = new PrintUDDI<BusinessEntity>();
                        logger.info(p2.print(businessDetail));
                }

                //trigger the callback
                BusinessEntity trigger = new BusinessEntity();
                trigger.getName().add(new Name("somebusiness trigger SubscriptionCallbackTest1", null));
                BusinessEntity triggered = clerk.register(trigger);
                //wait up to 30 seconds or until we get something
                long wait = TckPublisher.getSubscriptionTimeout();
                while (wait > 0 && notifications == 0) {
                        Thread.sleep(1000);
                        System.out.print(".");
                        wait--;
                }

                logger.info("Callback check." + notifications);
                //Thread.sleep(2000);
                SubscriptionCallbackListener.stop(manager, "default", start.getBindingKey());
                clerk.unRegisterSubscription(subscription.getSubscriptionKey());
                clerk.unRegisterTModel(createKeyGenator.getTModelKey());

                clerk.unRegisterBusiness(triggered.getBusinessKey());
                clerk.unRegisterBusiness(businessDetail.getBusinessKey());
                //verify
View Full Code Here

                Assume.assumeTrue(TckPublisher.isLoadTest());
                List<String> keys = new ArrayList<String>();
                for (int i = 0; i < 1000; i++) {
                        Holder<List<Subscription>> items = new Holder<List<Subscription>>();
                        items.value = new ArrayList<Subscription>();
                        Subscription s = new Subscription();
                        s.setSubscriptionFilter(new SubscriptionFilter());
                        s.getSubscriptionFilter().setFindBusiness(new FindBusiness());
                        s.getSubscriptionFilter().getFindBusiness().setFindQualifiers(new FindQualifiers());
                        s.getSubscriptionFilter().getFindBusiness().getFindQualifiers().getFindQualifier().add(UDDIConstants.APPROXIMATE_MATCH);
                        s.getSubscriptionFilter().getFindBusiness().getName().add(new Name(UDDIConstants.WILDCARD, null));
                        items.value.add(s);
                        sub.saveSubscription(authInfoJoe, items);
                        keys.add(items.value.get(0).getSubscriptionKey());
                }
                List<Subscription> subscriptions = sub.getSubscriptions(authInfoJoe);
View Full Code Here

                        tckSubscriptionListenerJoe.saveService(authInfoJoe, TckSubscriptionListener.LISTENER_HTTP_SERVICE_XML, httpPort, hostname);
                       
                        //Saving the Subscription
                        holder = new Holder<List<Subscription>>();
                        holder.value = new ArrayList<Subscription>();
                        Subscription sub = new Subscription();
                        sub.setBindingKey("uddi:uddi.joepublisher.com:bindinglistener");
                        sub.setNotificationInterval(DatatypeFactory.newInstance().newDuration(5000));
                        sub.setSubscriptionFilter(new SubscriptionFilter());
                        sub.getSubscriptionFilter().setGetBusinessDetail(new GetBusinessDetail());
                        sub.getSubscriptionFilter().getGetBusinessDetail().getBusinessKey().add(TckBusiness.MARY_BUSINESS_KEY);
                       
                        holder.value.add(sub);
                        subscriptionJoe.saveSubscription(authInfoJoe, holder);
                        //tckSubscriptionListenerJoe.saveNotifierSubscription(authInfoJoe, TckSubscriptionListener.SUBSCRIPTION3_XML);
                        //Changing the service we subscribed to "JoePublisherService"
View Full Code Here

TOP

Related Classes of org.infinispan.objectfilter.impl.predicateindex.Predicates$Subscription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.