Examples of NotificationPublisher


Examples of com.saasovation.common.notification.NotificationPublisher

        PublishedNotificationTrackerStore publishedNotificationTrackerStore =
                new HibernatePublishedNotificationTrackerStore(
                        new PersistenceManagerProvider(this.session()),
                        "unit.test");

        NotificationPublisher notificationPublisher =
                new RabbitMQNotificationPublisher(
                        eventStore,
                        publishedNotificationTrackerStore,
                        "unit.test");

        assertNotNull(notificationPublisher);

        notificationPublisher.publishNotifications();
    }
View Full Code Here

Examples of org.apache.airavata.workflow.tracking.impl.publish.NotificationPublisher

    }

    protected void sendNotification(WorkflowTrackingContext context, XmlObject xmldata,
            String[] descriptionAndAnnotation, String defaultDesc) {
        BaseNotificationType xmlMessage = XmlBeanUtils.extractBaseNotificationType(xmldata);
        NotificationPublisher publisher = publishermap.get(context.getBrokerEpr());
        try {
            if (publisher == null) {
                // if a publisher class name has been defined to override the default WSM publisher, use it
                if (context.getPublisherImpl() != null) {
                    publisher = PublisherFactory.createSomePublisher(context.getPublisherImpl(), context);
                } else {
                    if (context.getTopic() == null) {
                        publisher = new WSMPublisher(100, context.isEnableAsyncPublishing(), context.getBrokerEpr()
                                .getAddress(), false);
                    } else {
                        publisher = new WSMPublisher(100, context.isEnableAsyncPublishing(), context.getBrokerEpr()
                                .getAddress(), context.getTopic());
                    }
                }
                publishermap.put(context.getBrokerEpr(), publisher);
            }

            setIDAndTimestamp(context, xmlMessage, context.getMyself(), activityTimestamp != null ? activityTimestamp
                    : new Date());
            setDescAndAnno(context, xmlMessage, descriptionAndAnnotation, defaultDesc);
            xmlMessage.getNotificationSource().setExperimentID(context.getTopic());
            // System.out.println(xmldata);
            if (log.isDebugEnabled()) {
                log.debug(xmldata.toString());
            }
            publisher.publish(xmldata);
        } catch (RuntimeException e) {
            throw new WorkflowTrackingException(e);
        } catch (IOException e) {
            throw new WorkflowTrackingException(e);
        }
View Full Code Here

Examples of org.apache.airavata.workflow.tracking.impl.publish.NotificationPublisher

    }

    protected void sendNotification(WorkflowTrackingContext context, XmlObject xmldata,
            String[] descriptionAndAnnotation, String defaultDesc) {
        BaseNotificationType xmlMessage = XmlBeanUtils.extractBaseNotificationType(xmldata);
        NotificationPublisher publisher = publishermap.get(context.getBrokerEpr());
        try {
            if (publisher == null) {
                // if a publisher class name has been defined to override the default WSM publisher, use it
                if (context.getPublisherImpl() != null) {
                    publisher = PublisherFactory.createSomePublisher(context.getPublisherImpl(), context);
                } else {
                    if (context.getTopic() == null) {
                        publisher = new WSMPublisher(100, context.isEnableAsyncPublishing(), context.getBrokerEpr()
                                .getAddress(), false);
                    } else {
                        publisher = new WSMPublisher(100, context.isEnableAsyncPublishing(), context.getBrokerEpr()
                                .getAddress(), context.getTopic());
                    }
                }
                publishermap.put(context.getBrokerEpr(), publisher);
            }

            setIDAndTimestamp(context, xmlMessage, context.getMyself(), activityTimestamp != null ? activityTimestamp
                    : new Date());
            setDescAndAnno(context, xmlMessage, descriptionAndAnnotation, defaultDesc);
            // System.out.println(xmldata);
            if (log.isDebugEnabled()) {
                log.debug(xmldata.toString());
            }
            publisher.publish(xmldata);
        } catch (RuntimeException e) {
            throw new WorkflowTrackingException(e);
        } catch (IOException e) {
            throw new WorkflowTrackingException(e);
        }
View Full Code Here

Examples of org.springframework.jmx.export.notification.NotificationPublisher

  @Test
  public void testRepeatOperationsOpenUsed() throws Exception {
    final List<Notification> list = new ArrayList<Notification>();

    publisher.setNotificationPublisher(new NotificationPublisher() {
      @Override
      public void sendNotification(Notification notification) throws UnableToSendNotificationException {
        list.add(notification);
      }
    });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.