Examples of ProviderFactory


Examples of org.apache.cxf.jaxrs.provider.ProviderFactory

           
        }
    }
   
    private static ResponseExceptionMapper<?> findExceptionMapper(Method m, Message message) {
        ProviderFactory pf = ProviderFactory.getInstance(message);
        Class<?>[] exTypes = m.getExceptionTypes();
        if (exTypes.length == 0) {
            exTypes = new Class[]{WebApplicationException.class};
        }
        for (Class<?> exType : exTypes) {
            ResponseExceptionMapper<?> mapper = pf.createResponseExceptionMapper(exType);
            if (mapper != null) {
                return mapper;
            }
        }
        return null;
View Full Code Here

Examples of org.apache.cxf.jaxrs.provider.ProviderFactory

    public JAXRSOutInterceptor() {
        super(Phase.MARSHAL);
    }

    public void handleMessage(Message message) {
        ProviderFactory providerFactory = ProviderFactory.getInstance(message);
        try {
            processResponse(providerFactory, message);
        } finally {
            Object rootInstance = message.getExchange().remove(JAXRSUtils.ROOT_INSTANCE);
            Object rootProvider = message.getExchange().remove(JAXRSUtils.ROOT_PROVIDER);
            if (rootInstance != null && rootProvider != null) {
                try {
                    ((ResourceProvider)rootProvider).releaseInstance(message, rootInstance);
                } catch (Throwable tex) {
                    LOG.warning("Exception occurred during releasing the service instance, "
                                + tex.getMessage());
                }
            }
            providerFactory.clearThreadLocalProxies();
            ClassResourceInfo cri =
                (ClassResourceInfo)message.getExchange().get(JAXRSUtils.ROOT_RESOURCE_CLASS);
            if (cri != null) {
                cri.clearThreadLocalProxies();
            }
View Full Code Here

Examples of org.apache.cxf.js.rhino.ProviderFactory

    public static final String JS_PORT = allocatePort(Server.class);
    public static final String JSX_PORT = allocatePort(Server.class, 1);
    protected void run()  {
       
        try {           
            ProviderFactory pf = new ProviderFactory();           
            String f = getClass().getResource("resources/hello_world.js").toURI().getPath();
            f = URLDecoder.decode(f, "UTF-8");
            pf.createAndPublish(new File(f), "http://localhost:" + JS_PORT
                                + "/SoapContext/SoapPort", false);
            f = getClass().getResource("resources/hello_world.jsx").toURI().getPath();
            f = URLDecoder.decode(f, "UTF-8");
            pf.createAndPublish(new File(f), "http://localhost:" + JSX_PORT, false);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
View Full Code Here

Examples of org.apache.maven.surefire.booter.ProviderFactory

            ClassLoader unifiedClassLoader = classpathConfiguration.createMergedClassLoader();

            CommonReflector commonReflector = new CommonReflector( unifiedClassLoader );
            Object reporterFactory = commonReflector.createReportingReporterFactory( startupReportConfiguration );

            final ProviderFactory providerFactory =
                new ProviderFactory( startupConfiguration, providerConfiguration, unifiedClassLoader,
                                     reporterFactory );
            SurefireProvider surefireProvider = providerFactory.createProvider( false );
            return surefireProvider.getSuites();
        }
        catch ( SurefireExecutionException e )
        {
            throw new SurefireBooterForkException( "Unable to create classloader to find test suites", e );
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ProviderFactory

                }
            }

            // Remove the ProviderFactory from the runtime
            if (providerFactories != null && bindingActivator.getBindingClass() != null) {
                ProviderFactory factory = providerFactories.getProviderFactory(bindingActivator.getBindingClass());
                if (factory != null) {
                    providerFactories.removeProviderFactory(factory);
                }
            }
        }
        if (providerFactories != null) {
            ProviderFactory factory = providerFactories.getProviderFactory(PojoBinding.class);
            if (factory != null) {
                providerFactories.removeProviderFactory(factory);
            }
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.provider.ProviderFactory

        }

        try {
            if (processor != null) {
                bindingTemplate = createDelegatingBinding();
                ProviderFactory providerFactory = providerFactories.getProviderFactory(bindingTemplate.getClass());
                if (providerFactory == null) {
                    logger.warning("Mapped binding for binding.sca is not supported: " + mappedBinding);
                    processor = null;
                }
            }
View Full Code Here

Examples of org.keycloak.provider.ProviderFactory

            String provider = Config.getProvider(spi.getName());
            if (provider != null) {
                this.provider.put(spi.getProviderClass(), provider);

                ProviderFactory factory = loadProviderFactory(spi, provider);
                Config.Scope scope = Config.scope(spi.getName(), provider);
                factory.init(scope);

                factories.put(factory.getId(), factory);

                log.debugv("Loaded SPI {0} (provider = {1})", spi.getName(), provider);
            } else {
                for (ProviderFactory factory : ServiceLoader.load(spi.getProviderFactoryClass())) {
                    Config.Scope scope = Config.scope(spi.getName(), factory.getId());
                    factory.init(scope);

                    factories.put(factory.getId(), factory);
                }

                if (factories.size() == 1) {
                    provider = factories.values().iterator().next().getId();
                    this.provider.put(spi.getProviderClass(), provider);
View Full Code Here

Examples of org.objectweb.celtix.js.rhino.ProviderFactory

public class Server extends TestServerBase {

    protected void run()  {
        try {
            ProviderFactory pf = new ProviderFactory();
            String f = getClass().getResource("resources/hello_world.js").getFile();
            pf.createAndPublish(new File(f), "http://localhost:9000/SoapContext/SoapPort", false);
            f = getClass().getResource("resources/hello_world.jsx").getFile();
            pf.createAndPublish(new File(f), "http://localhost:9100", false);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }
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.