Package reactor.event

Examples of reactor.event.CachingRegistryTests$Subscription


    findAllServices.getName().add(name);
   
    SubscriptionFilter filter = new SubscriptionFilter();
    filter.setFindService(findAllServices);
   
    Subscription subscription = new Subscription();
    subscription.setSubscriptionFilter(filter);
    subscription.setBindingKey(bindingKey);
    subscription.setBrief(true);
    Duration oneMinute = DatatypeFactory.newInstance().newDuration("PT1M");
    subscription.setNotificationInterval(oneMinute);
    subscription.setSubscriptionKey(subscriptionKey);
    clerk.register(subscription);
  }
View Full Code Here


   
  }
 
  public void saveSubscription(String authInfo, String subscriptionXML, String subscriptionKey) {
    try {
      Subscription subIn = (Subscription)EntityCreator.buildFromDoc(subscriptionXML, "org.uddi.sub_v3");
      List<Subscription> subscriptionList = new ArrayList<Subscription>();
      subscriptionList.add(subIn);
      Holder<List<Subscription>> subscriptionHolder = new Holder<List<Subscription>>();
      subscriptionHolder.value = subscriptionList;
     
      subscription.saveSubscription(authInfo, subscriptionHolder);
     
      Subscription subDirectOut = subscriptionHolder.value.get(0);
      assertEquals(subIn.getSubscriptionKey(), subDirectOut.getSubscriptionKey());
     
      List<Subscription> outSubscriptionList = subscription.getSubscriptions(authInfo);
      Assert.assertNotNull(outSubscriptionList);
      Subscription subOut = outSubscriptionList.get(0);
     
      assertEquals(subIn.getSubscriptionKey(), subOut.getSubscriptionKey());
      assertEquals(subDirectOut.getExpiresAfter().getMonth(), subOut.getExpiresAfter().getMonth());
      assertEquals(subDirectOut.getExpiresAfter().getDay(), subOut.getExpiresAfter().getDay());
      assertEquals(subDirectOut.getExpiresAfter().getYear(), subOut.getExpiresAfter().getYear());
     
      //assertEquals(subIn.getSubscriptionFilter().getFindService().getName().get(0).getValue(),
      //       subOut.getSubscriptionFilter().getFindService().getName().get(0).getValue());
     
    } catch (Exception e) {
View Full Code Here

    deleteSubscription(authInfo, subscriptionKey);
  }
 
  public void saveSubscription(String authInfo, String subscriptionXML, String subscriptionKey) {
    try {
      Subscription subIn = (Subscription)EntityCreator.buildFromDoc(subscriptionXML, "org.uddi.sub_v3");
      List<Subscription> subscriptionList = new ArrayList<Subscription>();
      subscriptionList.add(subIn);
      Holder<List<Subscription>> subscriptionHolder = new Holder<List<Subscription>>();
      subscriptionHolder.value = subscriptionList;
     
      subscription.saveSubscription(authInfo, subscriptionHolder);
     
      Subscription subDirectOut = subscriptionHolder.value.get(0);
      assertEquals(subIn.getSubscriptionKey(), subDirectOut.getSubscriptionKey());
     
      List<Subscription> outSubscriptionList = subscription.getSubscriptions(authInfo);
      Assert.assertNotNull(outSubscriptionList);
      Subscription subOut = outSubscriptionList.get(0);
     
      //assertEquals(subIn.getSubscriptionKey(), subOut.getSubscriptionKey());
      assertEquals(subDirectOut.getExpiresAfter().getMonth(), subOut.getExpiresAfter().getMonth());
      assertEquals(subDirectOut.getExpiresAfter().getDay(), subOut.getExpiresAfter().getDay());
      assertEquals(subDirectOut.getExpiresAfter().getYear(), subOut.getExpiresAfter().getYear());
     
      //assertEquals(subIn.getSubscriptionFilter().getFindService().getName().get(0).getValue(),
      //       subOut.getSubscriptionFilter().getFindService().getName().get(0).getValue());
     
    } catch (Exception e) {
View Full Code Here

    findAllServices.getName().add(name);
   
    SubscriptionFilter filter = new SubscriptionFilter();
    filter.setFindService(findAllServices);
   
    Subscription subscription = new Subscription();
    subscription.setSubscriptionFilter(filter);
    subscription.setBindingKey(bindingKey);
    subscription.setBrief(true);
    Duration oneMinute = DatatypeFactory.newInstance().newDuration("PT1M");
    subscription.setNotificationInterval(oneMinute);
    subscription.setSubscriptionKey(subscriptionKey);
    clerk.register(subscription);
    this.subscriptionKey = subscriptionKey;
  }
View Full Code Here

        public void JUDDI_606_1() {
                System.out.println("JUDDI_606_1");
                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
                // Null expiration time

                Subscription sub = new Subscription();
                Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                data.value = new ArrayList<Subscription>();
                sub.setBrief(true);
                sub.setExpiresAfter(null);
                sub.setMaxEntities(1);
                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);
                try {
                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
                        Assert.assertNotNull(data.value.get(0).getExpiresAfter());
                } catch (Exception ex) {
View Full Code Here

                GregorianCalendar gcal = new GregorianCalendar();
                gcal.setTimeInMillis(System.currentTimeMillis());
                gcal.add(Calendar.DATE, -1);
                XMLGregorianCalendar newXMLGregorianCalendar = df.newXMLGregorianCalendar(gcal);

                Subscription sub = new Subscription();
                Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                data.value = new ArrayList<Subscription>();
                sub.setBrief(true);
                sub.setExpiresAfter(newXMLGregorianCalendar);
                sub.setMaxEntities(1);
                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);
                try {
                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
                        Assert.fail();
                } catch (Exception ex) {
View Full Code Here

        public void JUDDI_606_3() {
                System.out.println("JUDDI_606_3");
                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());
                //

                Subscription sub = new Subscription();
                Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                data.value = new ArrayList<Subscription>();
                sub.setBrief(true);
                sub.setExpiresAfter(null);
                sub.setMaxEntities(1);
                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);
                try {
                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
                        Assert.assertNotNull(data.value.get(0).getSubscriptionKey());
                        Assert.assertTrue(data.value.get(0).getSubscriptionKey().length() > 0);
View Full Code Here

        public void JUDDI_606_4() {
                System.out.println("JUDDI_606_4");
                //
                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());

                Subscription sub = new Subscription();
                Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                data.value = new ArrayList<Subscription>();
                sub.setBrief(true);
                sub.setExpiresAfter(null);
                sub.setMaxEntities(1);
                sub.setNotificationInterval(null);
                sub.setBindingKey(null);
                sub.setSubscriptionFilter(null);

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

        public void JUDDI_606_5() {
                System.out.println("JUDDI_606_5");
                //
                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());

                Subscription sub = new Subscription();
                Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                data.value = new ArrayList<Subscription>();
                sub.setBrief(true);
                sub.setExpiresAfter(null);
                sub.setMaxEntities(1);
                sub.setNotificationInterval(null);
                sub.setBindingKey(null);
                sub.setSubscriptionFilter(new SubscriptionFilter());

                data.value.add(sub);
                try {
                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
                        Assert.fail();
View Full Code Here

        public void JUDDI_606_6() {
                System.out.println("JUDDI_606_6");
                //
                Assume.assumeTrue(TckPublisher.isSubscriptionEnabled());

                Subscription sub = new Subscription();
                Holder<List<Subscription>> data = new Holder<List<Subscription>>();
                data.value = new ArrayList<Subscription>();
                sub.setBrief(true);
                sub.setExpiresAfter(null);
                sub.setMaxEntities(-1);
                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);
                try {
                        tckSubscriptionJoe.subscription.saveSubscription(authInfoJoe, data);
                        Assert.assertTrue(data.value.get(0).getMaxEntities() > 0);
                } catch (Exception ex) {
View Full Code Here

TOP

Related Classes of reactor.event.CachingRegistryTests$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.