Package org.mule.tck.functional

Examples of org.mule.tck.functional.EventCallback


    @Override
    protected void doSetUp() throws Exception
    {
        FunctionalTestComponent comp = (FunctionalTestComponent)getComponent("feedTransformer");
        comp.setEventCallback(new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                message = context.getMessage();
                receiveLatch.countDown();
View Full Code Here


    protected void doTest(MuleClient client, final String url, final String contextPath, final String requestPath) throws Exception
    {
        FunctionalTestComponent testComponent = (FunctionalTestComponent) getComponent(contextPath);
        assertNotNull(testComponent);
        
        EventCallback callback = new EventCallback()
        {
            public void eventReceived(final MuleEventContext context, final Object component) throws Exception
            {
                MuleMessage msg = context.getMessage();
                assertEquals(requestPath, msg.getInboundProperty(HttpConnector.HTTP_REQUEST_PROPERTY));
View Full Code Here

        MuleClient client = new MuleClient(muleContext);

        receiveFiles = new ArrayList<String>();

        EventCallback callback = new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {

                String filename = context.getMessage().getProperty(SftpConnector.PROPERTY_ORIGINAL_FILENAME,
View Full Code Here

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

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

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

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

    public void testPollingHttpConnector() throws Exception
    {
        FunctionalTestComponent ftc = getFunctionalTestComponent("polled");
        assertNotNull(ftc);
        ftc.setEventCallback(new EventCallback(){
            public void eventReceived(MuleEventContext context, Object component) throws Exception
            {
                assertEquals("The Accept header should be set on the incoming message", "application/xml", context.getMessage().<String>getInboundProperty("Accept"));
            }
        });
View Full Code Here

    }

    public void testAsyncPost() throws Exception
    {
        FunctionalTestComponent component = getFunctionalTestComponent("AsyncService");
        component.setEventCallback(new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object comp) throws Exception
            {
                Thread.sleep(200);
                context.getMessageAsString();
View Full Code Here

    }

    public void testAsyncPostWithPersistentSedaQueue() throws Exception
    {
        FunctionalTestComponent component = getFunctionalTestComponent("AsyncPersistentQueueService");
        component.setEventCallback(new EventCallback()
        {
            public void eventReceived(MuleEventContext context, Object comp) throws Exception
            {
                Thread.sleep(200);
                context.getMessageAsString();
View Full Code Here

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

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

        FunctionalTestComponent testComponent = getFunctionalTestComponent("testComponent");
        assertNotNull(testComponent);

        if (checkPathProperties)
        {
            EventCallback callback = new EventCallback()
            {
                public void eventReceived(final MuleEventContext context, final Object component) throws Exception
                {
                    MuleMessage msg = context.getMessage();
                    assertEquals("/", msg.getInboundProperty(HttpConnector.HTTP_REQUEST_PROPERTY));
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.