Package javax.net

Examples of javax.net.ServerSocketFactory


      log.warn("Error during stopping the thread", e);
    }
  }

  protected ServerSocket createServerSocket(int port) throws IOException {
    ServerSocketFactory socketFactory = tls ? SSLServerSocketFactory
        .getDefault() : ServerSocketFactory.getDefault();
    return socketFactory.createServerSocket(port);
  }
View Full Code Here


    public SimpleSSLSocketFactory() {
        super();
    }
   
    public ServerSocket createServerSocket(int port) throws IOException {
        ServerSocketFactory socketfactory = getSSLContext().getServerSocketFactory();
        return socketfactory.createServerSocket(port);
    }
View Full Code Here

            this.next.start();

            final ServerSocket serverSocket;
            try {
                if (this.secure) {
                    final ServerSocketFactory factory = SSLServerSocketFactory.getDefault();
                    serverSocket = factory.createServerSocket(this.port, this.backlog, this.inetAddress);
                    ((SSLServerSocket) serverSocket).setEnabledCipherSuites(this.enabledCipherSuites);
                } else {
                    serverSocket = new ServerSocket();
                    serverSocket.setReuseAddress(true);
View Full Code Here

        final HttpService httpService = new HttpService(
                httpProcessorCopy, connStrategyCopy, responseFactoryCopy, handlerMapperCopy,
                this.expectationVerifier);

        final ServerSocketFactory serverSocketFactory;
        if (this.sslContext != null) {
            serverSocketFactory = this.sslContext.getServerSocketFactory();
        } else {
            serverSocketFactory = ServerSocketFactory.getDefault();
        }
View Full Code Here

    public TransportServer doBind(final URI location) throws IOException {
        try {
            Map<String, String> options = new HashMap<String, String>(URISupport.parseParameters(location));

            ServerSocketFactory serverSocketFactory = createServerSocketFactory();
            TcpFaultyTransportServer server = createTcpFaultyTransportServer(location, serverSocketFactory);
            server.setWireFormatFactory(createWireFormatFactory(options));
            IntrospectionSupport.setProperties(server, options);
            Map<String, Object> transportOptions = IntrospectionSupport.extractProperties(options, "transport.");
            server.setTransportOption(transportOptions);
View Full Code Here

        }

        public void run() {

            List<Socket> inProgress = new ArrayList<Socket>();
            ServerSocketFactory factory = ServerSocketFactory.getDefault();

            try {
                ss = factory.createServerSocket(0);
                ss.setSoTimeout(5000);

                socketReadyLatch.countDown();
                while (!interrupted()) {
                    inProgress.add(ss.accept());    // eat socket
View Full Code Here

                     
    // Create the right kind of socket
    switch (getSSLMode()) {
    case SSL_OFF:
    default:
      ServerSocketFactory sf =
        ServerSocketFactory.getDefault();
      return sf.createServerSocket(portNumber
                     ,0,
                     hostAddress);
    case SSL_BASIC:
      SSLServerSocketFactory ssf =
        (SSLServerSocketFactory)SSLServerSocketFactory.getDefault();
View Full Code Here

    // @Override
    public ServerSocket createServerSocket(InetAddress address, int port, int backlog, Boolean reuse) throws IOException
    {
        try
        {
            ServerSocketFactory ssf = tls.getServerSocketFactory();
            SSLServerSocket serverSocket = (SSLServerSocket)ssf.createServerSocket();
            //PATCH
            serverSocket.setEnabledCipherSuites(Constants.allowedCipherSuites);
            return configure(serverSocket, reuse, new InetSocketAddress(address, port), backlog);
        }
        catch (IOException e)
View Full Code Here

    public SimpleSSLSocketFactory() {
        super();
    }
   
    public ServerSocket createServerSocket(int port) throws IOException {
        ServerSocketFactory socketfactory = getSSLContext().getServerSocketFactory();
        return socketfactory.createServerSocket(port);
    }
View Full Code Here

        final HttpService httpService = new HttpService(
                httpProcessorCopy, connStrategyCopy, responseFactoryCopy, handlerMapperCopy,
                this.expectationVerifier);

        ServerSocketFactory serverSocketFactoryCopy = this.serverSocketFactory;
        if (serverSocketFactoryCopy == null) {
            if (this.sslContext != null) {
                serverSocketFactoryCopy = this.sslContext.getServerSocketFactory();
            } else {
                serverSocketFactoryCopy = ServerSocketFactory.getDefault();
View Full Code Here

TOP

Related Classes of javax.net.ServerSocketFactory

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.