Examples of bind()


Examples of org.apache.http.impl.DefaultBHttpClientConnection.bind()

     */
    @Deprecated
    protected HttpClientConnection create(final Socket socket, final HttpParams params) throws IOException {
        final int bufsize = params.getIntParameter(CoreConnectionPNames.SOCKET_BUFFER_SIZE, 8 * 1024);
        final DefaultBHttpClientConnection conn = new DefaultBHttpClientConnection(bufsize);
        conn.bind(socket);
        return conn;
    }

    public HttpClientConnection create(final HttpHost host) throws IOException {
        final String scheme = host.getSchemeName();
View Full Code Here

Examples of org.apache.http.impl.DefaultBHttpServerConnection.bind()

            try {
                while (!interrupted()) {
                    final Socket socket = servicedSocket.accept();
                    acceptedConnections.incrementAndGet();
                    final DefaultBHttpServerConnection conn = createHttpServerConnection();
                    conn.bind(socket);
                    conn.setSocketTimeout(timeout);
                    // Start worker thread
                    final Worker worker = new Worker(conn);
                    workers.add(worker);
                    worker.setDaemon(true);
View Full Code Here

Examples of org.apache.http.impl.DefaultHttpClientConnection.bind()

        int port = schm.resolvePort(target.getPort());

        DefaultHttpClientConnection conn = new DefaultHttpClientConnection();
        Socket sock = schm.getSocketFactory().connectSocket
            (null, target.getHostName(), port, null, 0, params);
        conn.bind(sock, params);

        return conn;
    }

View Full Code Here

Examples of org.apache.http.impl.DefaultHttpServerConnection.bind()

            // Set up HTTP connection
            Socket socket = servicedSocket.accept();
            acceptedConnections.incrementAndGet();
            DefaultHttpServerConnection conn =
                new DefaultHttpServerConnection();
            conn.bind(socket, serverParams);

            // Set up the HTTP service
            HttpService httpService = new HttpService(
                httpProcessor,
                reuseStrategy,
View Full Code Here

Examples of org.apache.http.impl.nio.reactor.SSLIOSession.bind()

        session.setAttribute(SSL_SESSION, sslSession);

        this.handler.connected(conn);

        try {
            sslSession.bind(SSLMode.SERVER, this.params);
        } catch (SSLException ex) {
            this.handler.exception(conn, ex);
            sslSession.shutdown();
        }
    }
View Full Code Here

Examples of org.apache.http.nio.conn.ManagedNHttpClientConnection.bind()

        if (sf.isLayeringRequired()) {
            synchronized (managedConn) {
                final CPoolEntry entry = CPoolProxy.getPoolEntry(managedConn);
                final ManagedNHttpClientConnection conn = entry.getConnection();
                final IOSession currentSession = sf.upgrade(host, conn.getIOSession());
                conn.bind(currentSession);
            }
        }
    }

    public void upgrade(
View Full Code Here

Examples of org.apache.james.protocols.api.ProtocolServer.bind()

       
       
        ProtocolServer server = null;
        try {
            server = createServer(createProtocol(new ProtocolHandler[0]), address, Encryption.createStartTls(BogusSslContextFactory.getServerContext()))
            server.bind();
           
            SMTPSClient client = createClient();
            client.connect(address.getAddress().getHostAddress(), address.getPort());
            assertTrue(SMTPReply.isPositiveCompletion(client.getReplyCode()));
           
View Full Code Here

Examples of org.apache.james.protocols.netty.NettyServer.bind()

       
        NettyServer server = null;
        try {
            server = new NettyServer(createProtocol(hook));
            server.setListenAddresses(address);
            server.bind();
           
            SMTPClient client = createClient();
            client.connect(address.getAddress().getHostAddress(), address.getPort());
            assertTrue(SMTPReply.isPositiveCompletion(client.getReplyCode()));
           
View Full Code Here

Examples of org.apache.mina.common.IoAcceptor.bind()

        FixedRandomInputStream stream = new FixedRandomInputStream( 4 * 1024 * 1024 );
       
        SenderHandler sender = new SenderHandler( stream );
        ReceiverHandler receiver = new ReceiverHandler( stream.size );
       
        acceptor.bind( address, sender );
       
        synchronized( sender.lock )
        {
            synchronized( receiver.lock )
            {
View Full Code Here

Examples of org.apache.mina.core.service.IoAcceptor.bind()

        // and then a thread pool. REVIEWME
        filterChainBuilder.addLast("execFilter", new ExecutorFilter(ExecutorFactory.newCachedThreadPool("execFilter")));

        InetAddress host = InetAddress.getLocalHost();
        InetSocketAddress sockAddr = new InetSocketAddress(host, PORT);
        accepter.bind(sockAddr);

        if(JMX_MONITOR_ENABLED) {
            setupMonitor(accepter);
        }
    }
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.