Package org.mule.tck.functional

Examples of org.mule.tck.functional.EventCallback


        assertNotNull(hop1);
        FunctionalTestComponent hop2 = getFunctionalTestComponent("hop2");
        assertNotNull(hop2);

        final AtomicBoolean hop1made = new AtomicBoolean(false);
        EventCallback callback1 = new EventCallback()
        {
            @Override
            public void eventReceived(final MuleEventContext context, final Object component) throws Exception
            {
                assertTrue(hop1made.compareAndSet(false, true));
            }
        };

        final AtomicBoolean hop2made = new AtomicBoolean(false);
        EventCallback callback2 = new EventCallback()
        {
            public void eventReceived(final MuleEventContext context, final Object component) throws Exception
            {
                assertTrue(hop2made.compareAndSet(false, true));
            }
View Full Code Here


    @Test
    public void testComparator() throws Exception
    {
        final CountDownLatch countDown = new CountDownLatch(2);
        EventCallback callback = new EventCallback()
        {
            @Override
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                int index = (int) countDown.getCount() - 1;
View Full Code Here

        final CountDownLatch latch = new CountDownLatch(sendFiles.size());
        final AtomicInteger loopCount = new AtomicInteger(0);

        receiveFiles = new ArrayList<String>();

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

        final AtomicInteger totalReceivedSize = new AtomicInteger(0);

        // Random byte that we want to send a lot of
        final int testByte = 42;

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

        final FlowConstruct testSedaService = muleContext.getRegistry().lookupFlowConstruct("testComponent");
        FunctionalTestComponent testComponent = (FunctionalTestComponent) getComponent(testSedaService);
        assertNotNull(testComponent);

        final AtomicBoolean callbackMade = new AtomicBoolean(false);
        EventCallback callback = new EventCallback()
        {
            @Override
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                assertTrue(callbackMade.compareAndSet(false, true));
View Full Code Here

        }
        final Latch exceptionThrownLatch = new Latch();
        tmpDir = createFolder(getFileInsideWorkingDirectory("flowRefException").getAbsolutePath());
        final File file = createDataFile(tmpDir, "test1.txt");
        FunctionalTestComponent ftc = getFunctionalTestComponent("failingFlow");
        ftc.setEventCallback(new EventCallback()
        {
            @Override
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                exceptionThrownLatch.release();
View Full Code Here

    @Test
    public void testConsumeFileWithExAndRollback() throws Exception
    {
        final CountDownLatch countDownLatch = new CountDownLatch(2);
        FunctionalTestComponent ftc = getFunctionalTestComponent("consumeFileWithStreamingAndRollback");
        ftc.setEventCallback(new EventCallback()
        {
            @Override
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                countDownLatch.countDown();
View Full Code Here

    @Test
    public void testConsumeFileWithExAndRollbackWithRedelivery() throws Exception
    {
        final CountDownLatch countDownLatch = new CountDownLatch(3);
        FunctionalTestComponent ftc = getFunctionalTestComponent("consumeFileWithStreamingAndRollbackWithRedelivery");
        ftc.setEventCallback(new EventCallback()
        {
            @Override
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                countDownLatch.countDown();
View Full Code Here

        });
    }

    private EventCallback newCallback(final CountDownLatch latch, final AtomicReference<String> message)
    {
        return new EventCallback()
        {
            @Override
            public synchronized void eventReceived(MuleEventContext context, Object component)
            {
                try
View Full Code Here

    @Test
    public void testWorkDirectory() throws Exception
    {
        FunctionalTestComponent ftc = (FunctionalTestComponent) getComponent("relay");
        ftc.setEventCallback(new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                File workDir = getFileInsideWorkingDirectory("work");
                String[] filenames = workDir.list();
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.