Package org.mule.transport.service

Examples of org.mule.transport.service.TransportFactory


        static Connector createDynamicConnector(MuleContext muleContext)
        {
            try
            {
                return new TransportFactory(muleContext).createConnector(DYNAMIC_URI_PLACEHOLDER);
            }
            catch (final TransportFactoryException e)
            {
                // This should never happen
                throw new MuleRuntimeException(e);
View Full Code Here


            servletConnectorName = (String)getServletContext().getAttribute(MuleServletContextListener.CONNECTOR_NAME);
        }
       
        if (servletConnectorName == null)
        {
            connector = new TransportFactory(muleContext).getConnectorByProtocol(getConnectorProtocol());
            if (connector == null)
            {
                connector = new AjaxServletConnector(muleContext);
                connector.setName("ajax.servlet." + getServletContext().getServerInfo());
                try
View Full Code Here

                    // endpoints with the
                    // real http:// address
                    for (Iterator iterator = servletServices.iterator(); iterator.hasNext();)
                    {
                        SOAPService service = (SOAPService) iterator.next();
                        ServletConnector servletConnector = (ServletConnector) new TransportFactory(muleContext).getConnectorByProtocol("servlet");
                        String url = servletConnector.getServletUrl();
                        if (url != null)
                        {
                            service.getServiceDescription().setEndpointURL(url + "/" + service.getName());
                        }
View Full Code Here

    protected ServletConnector getOrCreateServletConnector(String name) throws ServletException
    {
        ServletConnector servletConnector;
        if (name == null)
        {
            servletConnector = (ServletConnector) new TransportFactory(muleContext).getConnectorByProtocol("servlet");
            if (servletConnector == null)
            {
                servletConnector = new ServletConnector(muleContext);
                servletConnector.setName("_generatedServletConnector");
                try
View Full Code Here

        static Connector createDynamicConnector(MuleContext muleContext)
        {
            try
            {
                return new TransportFactory(muleContext).createConnector(DynamicOutboundEndpoint.DYNAMIC_URI_PLACEHOLDER);
            }
            catch (TransportFactoryException e)
            {
                //This should never happen
                throw new MuleRuntimeException(e);
View Full Code Here

                {
                    cnn = (AbstractConnector) context.getRegistry().lookupConnector(epData.getConnectorName());
                }
                if (cnn == null)
                {
                    cnn = (AbstractConnector) new TransportFactory(context).createConnector(tempUri);
                    if (epData.getConnectorName() != null)
                    {
                        cnn.setName(epData.getConnectorName());
                    }
                    context.getRegistry().registerConnector(cnn);
View Full Code Here

    }

    private Connector getConnector(EndpointURI endpointURI) throws EndpointException
    {
        String scheme = getScheme();
        TransportFactory factory = new TransportFactory(muleContext);

        Connector connector;
        try
        {
            if (uriBuilder.getEndpoint().getConnectorName() != null)
            {
                connector = muleContext.getRegistry().lookupConnector(
                    uriBuilder.getEndpoint().getConnectorName());
                if (connector == null)
                {
                    throw new TransportFactoryException(CoreMessages.objectNotRegistered("Connector",
                        uriBuilder.getEndpoint().getConnectorName()));
                }
            }
            else if (isAlwaysCreateConnector())
            {
                connector = factory.createConnector(endpointURI);
                muleContext.getRegistry().registerConnector(connector);
            }
            else
            {
                connector = factory.getConnectorByProtocol(scheme);
                if (connector == null)
                {
                    connector = factory.createConnector(endpointURI);
                    muleContext.getRegistry().registerConnector(connector);
                }
            }
        }
        catch (Exception e)
View Full Code Here

    }

    private Connector getConnector(EndpointURI endpointURI) throws EndpointException
    {
        String scheme = getScheme();
        TransportFactory factory = new TransportFactory(muleContext);

        Connector connector;
        try
        {
            if (uriBuilder.getEndpoint().getConnectorName() != null)
            {
                connector = muleContext.getRegistry().lookupConnector(
                    uriBuilder.getEndpoint().getConnectorName());
                if (connector == null)
                {
                    throw new TransportFactoryException(CoreMessages.objectNotRegistered("Connector",
                        uriBuilder.getEndpoint().getConnectorName()));
                }
            }
            else if (isAlwaysCreateConnector())
            {
                connector = factory.createConnector(endpointURI);
                muleContext.getRegistry().registerConnector(connector);
            }
            else
            {
                connector = factory.getConnectorByProtocol(scheme);
                if (connector == null)
                {
                    connector = factory.createConnector(endpointURI);
                    muleContext.getRegistry().registerConnector(connector);
                }
            }
        }
        catch (Exception e)
View Full Code Here

        {
            found = muleContext.getRegistry().get(connectorName);
        }
        else if (connectorType != null)
        {
            found = new TransportFactory(muleContext).getDefaultConnectorByProtocol(connectorType);
        }
        return found;
    }
View Full Code Here

    protected ServletConnector getOrCreateServletConnector(String name) throws ServletException
    {
        ServletConnector servletConnector;
        if (name == null)
        {
            servletConnector = (ServletConnector) new TransportFactory(muleContext).getConnectorByProtocol("servlet");
            if (servletConnector == null)
            {
                servletConnector = new ServletConnector(muleContext);
                servletConnector.setName("_generatedServletConnector");
                try
View Full Code Here

TOP

Related Classes of org.mule.transport.service.TransportFactory

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.