Package org.mule.api.context.notification

Examples of org.mule.api.context.notification.EndpointMessageNotificationListener


     */
    protected void dispatchAndWaitForDelivery(final DispatchParameters p)
    {
        // Declare countdown latch and listener
        final CountDownLatch latch = new CountDownLatch(1);
        EndpointMessageNotificationListener listener = null;
        MuleClient muleClient = p.getMuleClient();
        boolean localMuleClient = muleClient == null;

        try
        {
            // First create a local muleClient instance if not supplied
            if (localMuleClient) muleClient = new MuleClient(muleContext);

            // Next create a listener that listens for dispatch events on the
            // outbound endpoint
            listener = new EndpointMessageNotificationListener()
            {
                public void onNotification(ServerNotification notification)
                {

                    // Only care about EndpointMessageNotification
View Full Code Here


        super.doSetUp();
        startServer();
        putFilesLatch = new CountDownLatch(1);


        muleContext.registerListener(new EndpointMessageNotificationListener() {
            public void onNotification(final ServerNotification notification) {

                EndpointMessageNotification messageNotification = (EndpointMessageNotification) notification;

                if (messageNotification.getEndpoint().contains("ftp")
View Full Code Here

        }
        dataDirectory.mkdirs();
        new File("./data/expenses/rejected").mkdirs();
        new File("./data/expenses/status").mkdirs();

        muleContext.registerListener(new EndpointMessageNotificationListener() {
            public void onNotification(final ServerNotification notification) {
                if ("expenseReportCallback".equals(notification.getResourceIdentifier())
                        && "end dispatch".equals(notification.getActionName())) {
                    latch.countDown();
                }
View Full Code Here

    @Override
    protected void doSetUp() throws Exception {
        super.doSetUp();
        copyExpenseReportLatch = new CountDownLatch(1);
        callbackLatch = new CountDownLatch(1);
        muleContext.registerListener(new EndpointMessageNotificationListener() {
            public void onNotification(final ServerNotification notification) {
                if ("copyExpenseReports".equals(notification.getResourceIdentifier())
                        && "receive".equals(notification.getActionName())) {
                    copyExpenseReportLatch.countDown();
                }
View Full Code Here

    }

    @Override
    protected void doSetUp() throws Exception {
        super.doSetUp();
        muleContext.registerListener(new EndpointMessageNotificationListener() {
            public void onNotification(final ServerNotification notification) {
                if ("sendExpenseReportEmails".equals(notification.getResourceIdentifier())
                        && "end dispatch".equals(notification.getActionName())) {
                    latch.countDown();
                }
View Full Code Here

        super.doSetUp();
        startServer();
        getFilesLatch = new CountDownLatch(1);
        putFilesLatch = new CountDownLatch(1);

        muleContext.registerListener(new EndpointMessageNotificationListener() {
            public void onNotification(final ServerNotification notification) {
                if ("retrieveSalesStatistics".equals(notification.getResourceIdentifier())
                        && "end dispatch".equals(notification.getActionName())) {
                    getFilesLatch.countDown();
                }
            }
        });

        muleContext.registerListener(new EndpointMessageNotificationListener() {
            public void onNotification(final ServerNotification notification) {
                if ("ftpProductCatalog".equals(notification.getResourceIdentifier())
                        && "end dispatch".equals(notification.getActionName())) {
                    putFilesLatch.countDown();
                }
View Full Code Here

    @Override
    protected void doSetUp() throws Exception {
        super.doSetUp();
        latch = new CountDownLatch(1);
        muleContext.registerListener(new EndpointMessageNotificationListener() {
            public void onNotification(final ServerNotification notification) {
                if ("sendExpenseReportEmails".equals(notification.getResourceIdentifier())
                        && "end dispatch".equals(notification.getActionName())) {
                    latch.countDown();
                }
View Full Code Here

    @SuppressWarnings("rawtypes")
    protected void dispatchAndWaitForDelivery(final DispatchParameters p)
    {
        // Declare countdown latch and listener
        final CountDownLatch latch = new CountDownLatch(1);
        EndpointMessageNotificationListener listener = null;

        try
        {
            // Next create a listener that listens for dispatch events on the
            // outbound endpoint
            listener = new EndpointMessageNotificationListener()
            {
                @Override
                public void onNotification(ServerNotification notification)
                {
View Full Code Here

TOP

Related Classes of org.mule.api.context.notification.EndpointMessageNotificationListener

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.