Package org.apache.cxf.transport.http_jetty

Examples of org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory


        // Bus shutdown will be called when the application context is closed.
        String orig = System.setProperty("org.apache.cxf.transports.http_jetty.DontClosePort", "false");
        IOHelper.close(applicationContext);
        System.setProperty("org.apache.cxf.transports.http_jetty.DontClosePort",
                           orig == null ? "true" : "false");
        JettyHTTPServerEngineFactory factory = bus.getExtension(JettyHTTPServerEngineFactory.class);
        // test if the port is still used
        JettyHTTPServerEngine engine = factory.retrieveJettyHTTPServerEngine(PORT2);
        assertNull("Jetty engine should be removed", engine);
    }
View Full Code Here


            JettyHTTPServerEngineFactoryConfigType config
                = (JettyHTTPServerEngineFactoryConfigType) getJaxbObject(element,
                    JettyHTTPServerEngineFactoryConfigType.class);

            factory = new JettyHTTPServerEngineFactory();

            Map<String, ThreadingParameters> threadingParametersMap
                = new TreeMap<String, ThreadingParameters>();

            if (config.getIdentifiedThreadingParameters() != null) {
View Full Code Here

        ApplicationContext appContext2 = new ClassPathXmlApplicationContext("fwspring.xml");
        idf = (IDaoFactory) appContext2.getBean("ibatisDao");       
    }

    public void start() throws Exception {
        JettyHTTPServerEngineFactory eg = new JettyHTTPServerEngineFactory();
        eg.createJettyHTTPServerEngine(this.port, "http");
        // bind the main service.
        Object implementor = new MainService(idf);
        Endpoint ep = Endpoint.publish("http://"+hostName+":" + port + "/aq2o", implementor);
        SOAPBinding soap = (SOAPBinding) ep.getBinding();
        soap.setMTOMEnabled(true);
View Full Code Here

        return server;
    }
   
   
    protected void setWorkManagerThreadPoolToJetty(Bus bus, String baseAddress) {
        JettyHTTPServerEngineFactory engineFactory = bus.getExtension(JettyHTTPServerEngineFactory.class);
        int port = getAddressPort(baseAddress);
        if (engineFactory.retrieveJettyHTTPServerEngine(port) != null) {
            return;
        }
        JettyHTTPServerEngine engine = new JettyHTTPServerEngine();
        AbstractConnector connector = new SelectChannelConnector();
        connector.setPort(port);
        connector.setThreadPool(new WorkManagerThreadPool(getWorkManager()));
        engine.setConnector(connector);
        engine.setPort(port);
       
        List<JettyHTTPServerEngine> engineList = new ArrayList<JettyHTTPServerEngine>();
        engineList.add(engine);
        engineFactory.setEnginesList(engineList);
    }
View Full Code Here

   
    public AbstractHTTPDestination createDestination(EndpointInfo endpointInfo, Bus bus,
                                                     DestinationRegistry registry) throws IOException {
        if (endpointInfo.getAddress().startsWith("ws")) {
            // for the embedded mode, we stick with jetty.
            JettyHTTPServerEngineFactory serverEngineFactory = bus
                .getExtension(JettyHTTPServerEngineFactory.class);
            return new JettyWebSocketDestination(bus, registry, endpointInfo, serverEngineFactory);
        } else {
            //REVISIT other way of getting the registry of http so that the plain cxf servlet finds the destination?
            registry = getDestinationRegistry(bus);
View Full Code Here

        return server;
    }
   
   
    protected void setWorkManagerThreadPoolToJetty(Bus bus, String baseAddress) {
        JettyHTTPServerEngineFactory engineFactory = bus.getExtension(JettyHTTPServerEngineFactory.class);
        int port = getAddressPort(baseAddress);
        if (engineFactory.retrieveJettyHTTPServerEngine(port) != null) {
            return;
        }
        JettyHTTPServerEngine engine = new JettyHTTPServerEngine();
        AbstractConnector connector = new SelectChannelConnector();
        connector.setPort(port);
        connector.setThreadPool(new WorkManagerThreadPool(getWorkManager()));
        engine.setConnector(connector);
        engine.setPort(port);
       
        List<JettyHTTPServerEngine> engineList = new ArrayList<JettyHTTPServerEngine>();
        engineList.add(engine);
        engineFactory.setEnginesList(engineList);
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.transport.http_jetty.JettyHTTPServerEngineFactory

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.