Examples of EventCallback


Examples of org.mule.tck.functional.EventCallback

    public void testReceiver() throws Exception
    {
        final CountDownLatch countDown = new CountDownLatch(1);

        HashMap props = new HashMap();
        props.put("eventCallback", new EventCallback()
        {
            public synchronized void eventReceived(MuleEventContext context, Object component)
            {
                try
                {
View Full Code Here

Examples of org.mule.tck.functional.EventCallback

        ((CompositeMessageSource) service.getMessageSource()).addSource(endpoint);
       
        final Latch latch = new Latch();
        FunctionalTestComponent testComponent = new FunctionalTestComponent();
        testComponent.setMuleContext(muleContext);
        testComponent.setEventCallback(new EventCallback()
        {
            public void eventReceived(final MuleEventContext context, final Object message) throws Exception
            {               
                assertEquals(1, latch.getCount());
                assertEquals(TEST_MESSAGE, context.transformMessageToString());
View Full Code Here

Examples of org.mule.tck.functional.EventCallback

        return "tcp-streaming-test.xml";
    }

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

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

Examples of org.mule.tck.functional.EventCallback

    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

Examples of org.mule.tck.functional.EventCallback

        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

Examples of org.mule.tck.functional.EventCallback

    {
        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

Examples of org.mule.tck.functional.EventCallback

    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

Examples of org.mule.tck.functional.EventCallback

    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

Examples of org.mule.tck.functional.EventCallback

    }

    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
TOP
Copyright © 2018 www.massapi.com. 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.