Package org.mule.tck.functional

Examples of org.mule.tck.functional.EventCallback


    {
        final CountDownLatch countDownLatch = new CountDownLatch(1);

        final List<Object> receivedPayloads = new ArrayList<Object>();

        final EventCallback callback = new EventCallback()
        {
            public void eventReceived(final MuleEventContext context, final Object component)
                throws Exception
            {
View Full Code Here


        final Latch latch = new Latch();//<co id="lis_12_acme_api_bridge_improved_test-1"/>

        FunctionalTestComponent ftc =
                        getFunctionalTestComponent("acmeApiStub");

        ftc.setEventCallback(new EventCallback()//<co id="lis_12_acme_api_bridge_improved_test-2"/>
        {
            public void eventReceived(
                             MuleEventContext context,
                             Object component)
                     throws Exception
View Full Code Here

        assertTrue("Service should be a TestSedaService", c instanceof TestSedaService);
        Object ftc = getComponent(c);
        assertNotNull("Functional Test Service not found in the model.", ftc);
        assertTrue("Service should be a FunctionalTestComponent", ftc instanceof FunctionalTestComponent);

        EventCallback cc = ((FunctionalTestComponent) ftc).getEventCallback();
        assertNotNull("EventCallback is null", cc);
        assertTrue("EventCallback should be a CounterCallback", cc instanceof CounterCallback);
        assertEquals(NUM_MESSAGES, ((CounterCallback) cc).getCallbackCount());
    }
View Full Code Here

    public void testRequest() throws Exception
    {
        final CountDownLatch latch = new CountDownLatch(1);
        final AtomicReference<MuleMessage> messageHolder = new AtomicReference<MuleMessage>();

        EventCallback callback = new EventCallback()
        {
            @Override
            public synchronized void eventReceived(MuleEventContext context, Object component)
            {
                try
View Full Code Here

    public void testNormalExecutionFlow() throws Exception
    {
        FunctionalTestComponent testComponent = getFunctionalTestComponent("normalExecutionFlow");
        assertNotNull(testComponent);

        EventCallback callback = new EventCallback()
        {
            @Override
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                MuleMessage msg = context.getMessage();
View Full Code Here

        ((CompositeMessageSource) service.getMessageSource()).addSource(endpoint);

        final Latch latch = new Latch();
        FunctionalTestComponent testComponent = new FunctionalTestComponent();
        testComponent.setMuleContext(muleContext);
        testComponent.setEventCallback(new EventCallback()
        {
            @Override
            public void eventReceived(final MuleEventContext context, final Object message) throws Exception
            {
                assertEquals(1, latch.getCount());
View Full Code Here

        final AtomicInteger loopCount = new AtomicInteger(0);

        assertTrue("muleContext is not started", muleContext.isStarted());
        receiveFiles = new ArrayList<String>();

        EventCallback callback = new EventCallback()
        {
            @Override
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                logger.info("called " + loopCount.incrementAndGet() + " times");
View Full Code Here

    {
        final CountDownLatch latch = new CountDownLatch(1);
        final AtomicReference<String> message = new AtomicReference<String>();
        final AtomicInteger loopCount = new AtomicInteger(0);

        EventCallback callback = new EventCallback()
        {
            @Override
            public synchronized void eventReceived(MuleEventContext context, Object component)
            {
                try
View Full Code Here

    public void testSend() throws Exception
    {
        final CountDownLatch latch = new CountDownLatch(1);
        final AtomicReference<String> message = new AtomicReference<String>();

        EventCallback callback = new EventCallback()
        {
            @Override
            public synchronized void eventReceived(MuleEventContext context, Object component)
            {
                try
View Full Code Here

    {
        final CountDownLatch latch = new CountDownLatch(1);
        final AtomicReference<String> message = new AtomicReference<String>();
        final AtomicInteger loopCount = new AtomicInteger(0);

        EventCallback callback = new EventCallback()
        {
            @Override
            public synchronized void eventReceived(MuleEventContext context, Object component)
            {
                try
View Full Code Here

TOP

Related Classes of org.mule.tck.functional.EventCallback

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.