Examples of ServerSocketFactory


Examples of org.apache.avalon.cornerstone.services.sockets.ServerSocketFactory

     * @exception Exception if server socket factory is not available
     */
    public ServerSocketFactory getServerSocketFactory( String name )
        throws Exception
    {
        final ServerSocketFactory factory = (ServerSocketFactory)m_serverSockets.get( name );

        if( null != factory )
        {
            return factory;
        }
View Full Code Here

Examples of org.apache.avalon.cornerstone.services.sockets.ServerSocketFactory

            threadPool = threadManager.getThreadPool(threadGroup);
        } else {
            threadPool = threadManager.getDefaultThreadPool();
        }

        ServerSocketFactory factory = socketManager.getServerSocketFactory(serverSocketType);
        ServerSocket serverSocket = factory.createServerSocket(port, 5, bindTo);
   
        if (null == connectionName) {
            final StringBuffer sb = new StringBuffer();
            sb.append(serverSocketType);
            sb.append(':');
View Full Code Here

Examples of org.apache.catalina.net.ServerSocketFactory

            throw new LifecycleException("Already initialized");
        this.initialized=true;

        // Get a hold on a server socket
        try {
            ServerSocketFactory fact=this.getFactory();
            int port=this.getPort();
            int accc=this.getAcceptCount();

            if (this.getAddress()==null) {
                this.server=fact.createSocket(port,accc);
            } else {
                InetAddress addr=InetAddress.getByName(this.getAddress());
                this.server=fact.createSocket(port,accc,addr);
            }
        } catch (Exception e) {
            throw new LifecycleException("Error creating server socket ("+
                e.getClass().getName()+")",e);
        }
View Full Code Here

Examples of org.apache.catalina.net.ServerSocketFactory

            throw new LifecycleException("Already initialized");
        this.initialized=true;

        // Get a hold on a server socket
        try {
            ServerSocketFactory fact=this.getFactory();
            int port=this.getPort();
            int accc=this.getAcceptCount();

            if (this.getAddress()==null) {
                this.server=fact.createSocket(port,accc);
            } else {
                InetAddress addr=InetAddress.getByName(this.getAddress());
                this.server=fact.createSocket(port,accc,addr);
            }
        } catch (IOException e) {
            throw new LifecycleException("Error creating server socket",e);
        }
    }
View Full Code Here

Examples of org.apache.catalina.net.ServerSocketFactory

           CertificateException, UnrecoverableKeyException,
           KeyManagementException
    {

        // Acquire the server socket factory for this Connector
        ServerSocketFactory factory = getFactory();

        // If no address is specified, open a connection on all addresses
        if (address == null) {
            log(sm.getString("httpConnector.allAddresses"));
            try {
                return (factory.createSocket(port, acceptCount));
            } catch (BindException be) {
                throw new BindException(be.getMessage() + ":" + port);
            }
        }

        // Open a server socket on the specified address
        try {
            InetAddress is = InetAddress.getByName(address);
            log(sm.getString("httpConnector.anAddress", address));
            try {
                return (factory.createSocket(port, acceptCount, is));
            } catch (BindException be) {
                throw new BindException(be.getMessage() + ":" + address +
                                        ":" + port);
            }
        } catch (Exception e) {
            log(sm.getString("httpConnector.noAddress", address));
            try {
                return (factory.createSocket(port, acceptCount));
            } catch (BindException be) {
                throw new BindException(be.getMessage() + ":" + port);
            }
        }
View Full Code Here

Examples of org.apache.catalina.net.ServerSocketFactory

     * @exception IOException if an input/output error occurs
     */
    private ServerSocket open() throws IOException {

        // Acquire the server socket factory for this Connector
        ServerSocketFactory factory = getFactory();

  // If no address is specified, open a connection on all addresses
        if (address == null) {
      logger.log(sm.getString("ajp13Connector.allAddresses"));
            try {
    return (factory.createSocket(port, acceptCount));
      } catch(Exception ex ) {
    ex.printStackTrace();
    return null;
      }
  }

  // Open a server socket on the specified address
        try {
            InetAddress is = InetAddress.getByName(address);
      logger.log(sm.getString("ajp13Connector.anAddress", address));
            return (factory.createSocket(port, acceptCount, is));
  } catch (Exception e) {
      try {
    logger.log(sm.getString("ajp13Connector.noAddress", address));
    return (factory.createSocket(port, acceptCount));
      } catch( Exception e1 ) {
    e1.printStackTrace();
    return null;
      }
  }
View Full Code Here

Examples of org.apache.catalina.net.ServerSocketFactory

        String prop = (String) getProperty("clientauth");
        if (prop != null) {
            ret = prop;
        } else
            ServerSocketFactory factory = this.getFactory();
            if (factory instanceof CoyoteServerSocketFactory) {
                ret = ((CoyoteServerSocketFactory)factory).getClientAuth();
            }
        }
View Full Code Here

Examples of org.apache.catalina.net.ServerSocketFactory

        return ret;
    }

    public void setClientAuth(String clientAuth) {
        setProperty("clientauth", clientAuth);
        ServerSocketFactory factory = this.getFactory();
        if (factory instanceof CoyoteServerSocketFactory) {
            ((CoyoteServerSocketFactory)factory).setClientAuth(clientAuth);
        }
    }
View Full Code Here

Examples of org.apache.catalina.net.ServerSocketFactory


    public String getKeystoreFile() {
        String ret = (String) getProperty("keystore");
        if (ret == null) {
            ServerSocketFactory factory = this.getFactory();
            if (factory instanceof CoyoteServerSocketFactory) {
                ret = ((CoyoteServerSocketFactory)factory).getKeystoreFile();
            }
        }
View Full Code Here

Examples of org.apache.catalina.net.ServerSocketFactory

        return ret;
    }

    public void setKeystoreFile(String keystoreFile) {
        setProperty("keystore", keystoreFile);
        ServerSocketFactory factory = this.getFactory();
        if (factory instanceof CoyoteServerSocketFactory) {
            ((CoyoteServerSocketFactory)factory).setKeystoreFile(keystoreFile);
        }
    }
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.