Package org.mule.context.notification

Examples of org.mule.context.notification.ClusterNodeNotification


        Mockito.doAnswer(new Answer<Void>()
        {
            @Override
            public Void answer(InvocationOnMock invocationOnMock) throws Throwable
            {
                ((PrimaryNodeLifecycleNotificationListener) invocationOnMock.getArguments()[0]).onNotification(new ClusterNodeNotification("",1));
                return null;
            }
        }).when(muleContext).registerListener(isA(PrimaryNodeLifecycleNotificationListener.class));

        wrapper.initialise();
View Full Code Here


            }
        }).when(muleContext).registerListener(isA(PrimaryNodeLifecycleNotificationListener.class));
        wrapper.initialise();
        wrapper.start();
        when(muleContext.isPrimaryPollingInstance()).thenReturn(true);
        primaryNodeLifecycleNotificationListener[0].onNotification(new ClusterNodeNotification("", 1));
        verify(messageSource, times(1)).start();
    }
View Full Code Here

        ClusterizableMessageSourceWrapper messageSource = (ClusterizableMessageSourceWrapper) test1.getMessageSource();

        messageSource.initialise();

        pollingController.isPrimary=true;
        muleContext.fireNotification(new ClusterNodeNotification("primary", ClusterNodeNotification.PRIMARY_CLUSTER_NODE_SELECTED));

        LocalMuleClient client = muleContext.getClient();
        MuleMessage response = client.request("vm://testOut", 5000);
        assertEquals("TEST", response.getPayload());
    }
View Full Code Here

TOP

Related Classes of org.mule.context.notification.ClusterNodeNotification

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.