Package org.mule.api.endpoint

Examples of org.mule.api.endpoint.EndpointBuilder.buildInboundEndpoint()


    @Test
    public void testConfig2() throws Exception
    {
        EndpointBuilder epb = muleContext.getRegistry().lookupEndpointBuilder("testEndpoint2");
        assertNotNull(epb);
        InboundEndpoint iep = epb.buildInboundEndpoint();

        assertNotNull(iep.getTransactionConfig());
        assertTrue(iep.getTransactionConfig().getFactory() instanceof TestTransactionFactory);
        assertEquals(TransactionConfig.ACTION_ALWAYS_BEGIN, iep.getTransactionConfig().getAction());
        assertEquals(muleContext.getConfiguration().getDefaultTransactionTimeout(), iep.getTransactionConfig().getTimeout());
View Full Code Here


        context.start();
        assertTrue(context.isStarted());

        final EndpointBuilder endpoint = context.getRegistry().lookupEndpointBuilder("endpoint");
        assertNotNull(endpoint);
        assertEquals("test://value", endpoint.buildInboundEndpoint().getEndpointURI().toString());

        context.dispose();
    }
}
View Full Code Here

        assertEquals("utf-8", inbound.getEncoding());
        OutboundEndpoint outbound = muleContext.getRegistry().lookupObject("outbound");
        assertEquals("application/json", outbound.getMimeType());
        assertEquals("iso-8859-2", outbound.getEncoding());
        EndpointBuilder global = muleContext.getRegistry().lookupEndpointBuilder("global");
        InboundEndpoint created = global.buildInboundEndpoint();
        assertEquals("application/xml", created.getMimeType());
        assertEquals("iso-8859-1", created.getEncoding());
    }
}
View Full Code Here

        InboundEndpoint jmsEndpoint = jmsEndpointBuilder.buildInboundEndpoint();
        Connector jmsConnector = jmsEndpoint.getConnector();
        InboundEndpoint vmEndpoint = vmEndpointBuilder.buildInboundEndpoint();
        Connector vmConnector = vmEndpoint.getConnector();
        InboundEndpoint ajaxEndpoint = ajaxEndpointBuilder.buildInboundEndpoint();
        Connector ajaxConnector = ajaxEndpoint.getConnector();

        DefaultReplyToHandler jmsHandler = (DefaultReplyToHandler) ((AbstractConnector)jmsConnector).getReplyToHandler(jmsEndpoint);
        DefaultReplyToHandler vmHandler = (DefaultReplyToHandler) ((AbstractConnector)vmConnector).getReplyToHandler(vmEndpoint);
        DefaultReplyToHandler ajaxHandler = (DefaultReplyToHandler) ((AbstractConnector)ajaxConnector).getReplyToHandler(ajaxEndpoint);
View Full Code Here

    @Test
    public void testInterceptingCompositeOnEndpoint() throws Exception
    {
        EndpointBuilder endpointBuilder = muleContext.getRegistry().lookupEndpointBuilder("endpoint");
        InboundEndpoint endpoint = endpointBuilder.buildInboundEndpoint();
        assertEquals(2, endpoint.getMessageProcessors().size());

        MessageProcessor endpointProcessor = endpoint.getMessageProcessorsFactory()
            .createInboundMessageProcessorChain(endpoint, null, new NullMessageProcessor());
View Full Code Here

                .getRegistry().lookupEndpointFactory().getEndpointBuilder(
                        sourceFolderUri + fileName);

        endpointBuilder.setConnector(fileConnector);

        final MuleMessage requestedFileMessage = endpointBuilder
                .buildInboundEndpoint().request(0);

        return requestedFileMessage != null ? DigestUtils
                .md5Hex(requestedFileMessage.getPayloadAsBytes()) : null;
    }
View Full Code Here

                pollGlobalEndpoint.set(epBuilder != null);

                if (pollGlobalEndpoint.get())
                {
                    // referencing a global endpoint, fetch configuration from it
                    endpoint = epBuilder.buildInboundEndpoint();

                    //TODO MULE-5050 work around because the builder is no longer idempotent, we now cache the endpoint instance
                    muleContext.getRegistry().registerObject(jobConfig.getEndpointRef() + ".quartz-job", endpoint);
                    executionTemplate = TransactionalErrorHandlingExecutionTemplate.createMainExecutionTemplate(muleContext, endpoint.getTransactionConfig(), receiver.getFlowConstruct().getExceptionListener());
                }
View Full Code Here

        SftpConnector c = (SftpConnector) registry.lookupConnector("sftp");
        assertNotNull(c);

        EndpointBuilder epb = registry.lookupEndpointBuilder("InvalidEndpoint");
        InboundEndpoint ep = epb.buildInboundEndpoint();

        // Verify that failed creations of sftp-clients don't leak resources (e.g.
        // ssh-servers)
        // In v2.2.1-RC2 this tests fails after 132 attempts on a Mac OSX 10.6
        // machine
View Full Code Here

        {
            // For Endpoint-references
            EndpointBuilder eb = (EndpointBuilder) o;
            try
            {
                endpoint = eb.buildInboundEndpoint();
            }
            catch (Exception e)
            {
                throw new IOException(e.getMessage());
            }
View Full Code Here

    @Test
    public void testEmbeddedEndpoint() throws Exception
    {
        EndpointBuilder b = muleContext.getRegistry().lookupEndpointBuilder("endpoint1");
        assertNotNull(b);
        InboundEndpoint ep = b.buildInboundEndpoint();
        assertEquals("/request", ep.getEndpointURI().getPath());
    }

    @Test
    public void testServletEndpoint() throws Exception
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.