Package org.mortbay.util

Examples of org.mortbay.util.InetAddrPort


            // Setting this property to a not null value will imply that the Jetty server will only
            // accept connect requests to that IP address
            String interfaceName = properties.getProperty("adminConsole.inteface");
            String port = properties.getProperty("adminConsole.port");
            int adminPort = (port == null ? 9090 : Integer.parseInt(port));
            InetAddrPort address = new InetAddrPort(interfaceName, adminPort);
            if (adminPort > 0) {
                jetty.addListener(address);
                plainStarted = true;
            }
View Full Code Here


        if (server == null) {
            server = new HttpServer();
           
            if (sslPolicy != null) {
                listener = new SslListener(new InetAddrPort(port));
                SslListener secureListener = (SslListener)listener;
               
                JettySslListenerConfigurer secureListenerConfigurer =
                    new JettySslListenerConfigurer(config, sslPolicy, secureListener);
                secureListenerConfigurer.configure();

            } else {
                listener = new SocketListener(new InetAddrPort(port));
            }
           
            if (policy.isSetMinThreads()) {
                listener.setMinThreads(policy.getMinThreads());
            }
View Full Code Here

       
        assertNotNull(endpoint);
        assertTrue(!endpoint.isPublished());
       
        HttpServer server = new HttpServer();     
        SocketListener listener = new SocketListener(new InetAddrPort(27220));
        server.addListener(listener);
        try {
            server.start();
        } catch (Exception e) {
            // TODO Auto-generated catch block
View Full Code Here

            server = new Server();
            WebApplicationContext applicationContext = new WebApplicationContext(fckRootFolder.getAbsolutePath());
            applicationContext.setContextPath("/");
            applicationContext.addHandler(new ResourceHandler());
            server.addContext(applicationContext);
            InetAddrPort address = new InetAddrPort(SERVER_PORT);
            server.addListener(address);
            server.start();
        }
        monitor.worked(remain);
    }
View Full Code Here

     * Create a Listener.
     *
     * @param p the listen port
     */
    public SocketListener createListener(int port) {
        SslListener secureListener = new SslListener(new InetAddrPort(port));
        decorate(secureListener);
        return secureListener;
    }
View Full Code Here

   
    protected static JettyListenerFactory getListenerFactory(SSLServerPolicy policy) {
        return policy == null
               ? new JettyListenerFactory() {
                       public SocketListener createListener(int port) {
                           return new SocketListener(new InetAddrPort(port));
                       }
                   }
               : new JettySslListenerFactory(policy);
    }
View Full Code Here

     * @throws IOException if port could not be set
     */
    public InternalHttpServer() throws IOException {
      super();
      port = PortProber.findFreePort();
      addListener(new InetAddrPort(port));
    }
View Full Code Here

TOP

Related Classes of org.mortbay.util.InetAddrPort

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.