Searched refs:connection (Results 1 - 12 of 12) sorted by relevance

/dalvik/libcore/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/http/
H A DHttpConnectionPool.java39 * <p>If a security manager is in place, HTTP connection pooling will be
70 // First try to reuse an existing HTTP connection.
75 HttpConnection connection = connections.remove(connections.size() - 1);
76 if (!connection.isStale()) {
77 return connection;
85 * We couldn't find a reusable connection, so we need to create a new
86 * connection. We're careful not to do so while holding a lock!
91 public void recycle(HttpConnection connection) { argument
92 if (maxConnections > 0 && connection.isEligibleForRecycling()) {
93 HttpConfiguration config = connection
[all...]
H A DHttpURLConnectionImpl.java76 protected HttpConnection connection; field in class:HttpURLConnectionImpl
108 // proxy which is used to make the connection.
369 // Otherwise the next caller on this connection will receive that data.
699 * cause the connection to be closed entirely or returned
700 * to the connection pool. In the former case, we simply
703 * while, meanwhile, the connection has been handed back
793 * URL The URL this connection is connecting
803 * URL The URL this connection is connecting
805 * int The default connection port
829 * URL The URL this connection i
936 setUpTransportIO(HttpConnection connection) argument
[all...]
/dalvik/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/https/
H A DHttpsURLConnectionTest.java91 // read/connection timeout value
138 * Checks if HTTPS connection performs initial SSL handshake with the
141 * test checks connection state parameters established by
146 notes = "Verifies if HTTPS connection performs initial SSL handshake with the server working over SSL, sends encrypted HTTP request, and receives expected HTTP response.",
166 // create url connection to be tested
168 HttpsURLConnection connection = (HttpsURLConnection) url
172 SSLSocket peerSocket = (SSLSocket) doInteraction(connection, ss);
174 // check the connection state
175 checkConnectionStateParameters(connection, peerSocket);
178 connection
1351 private HttpURLConnection connection; field in class:HttpsURLConnectionTest.ClientConnectionWork
1357 ClientConnectionWork(HttpURLConnection connection) argument
[all...]
/dalvik/libcore/luni/src/test/java/org/apache/harmony/luni/tests/internal/net/www/protocol/http/
H A DHttpURLConnectionTest.java110 // this connection was closed, create new one:
138 * Selector will return the proxy, only if the connection
199 * method will be used for connection to the server
203 notes = "Verifies if the proxy specified in openConnection method will be used for connection to the server.",
214 HttpURLConnection connection = (HttpURLConnection) url
218 connection.setConnectTimeout(2000);
219 connection.setReadTimeout(2000);
230 connection.connect();
236 assertTrue("Connection does not use proxy", connection.usingProxy());
245 * will be used for connection t
[all...]
/dalvik/libcore/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/
H A DTestHelper_Driver1.java88 // It all checks out - so return a connection
89 Connection connection = new TestHelper_Connection1();
90 return connection;
H A DTestHelper_Driver4.java104 // It all checks out - so return a connection
105 Connection connection = new TestHelper_Connection1();
106 return connection;
/dalvik/libcore/x-net/src/test/java/tests/api/javax/net/ssl/
H A DHttpsURLConnectionTest.java85 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
87 connection.getCipherSuite();
116 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
118 connection.getLocalCertificates();
201 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
203 connection.getLocalPrincipal();
234 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
236 connection.getPeerPrincipal();
273 HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
275 connection
[all...]
/dalvik/libcore/luni/src/test/java/tests/api/java/net/
H A DJarURLConnectionTest.java269 JarURLConnection connection = null;
270 connection = (JarURLConnection) url.openConnection();
272 connection.connect();
279 connection.getJarFile();
360 JarURLConnection connection = (JarURLConnection) url.openConnection();
361 connection.setUseCaches(false);
362 InputStream in = connection.getInputStream();
363 in = connection.getInputStream();
364 JarFile jarFile1 = connection.getJarFile();
365 JarEntry jarEntry1 = connection
[all...]
/dalvik/libcore/luni/src/test/java/java/net/
H A DURLConnectionTest.java46 URLConnection connection = new URL("http://localhost:" + mPort + "/test1").openConnection();
47 BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
54 // recycled connection doesn't get the unread tail of the first request's response.
176 // The client already closed the connection.
/dalvik/libcore/luni/src/main/java/org/apache/harmony/luni/internal/net/www/protocol/https/
H A DHttpsURLConnectionImpl.java46 // SSLSocket to be used for connection
371 // first - make the connection
389 InputStream is = connection.getInputStream();
399 sslSocket = connection.getSecureSocket(getSSLSocketFactory(), getHostnameVerifier());
400 setUpTransportIO(connection);
/dalvik/libcore/sql/src/test/java/tests/java/sql/
H A DQueryTimeoutTest.java58 * threads execute their statement in the context of one connection, the other
59 * two threads in the context of the other connection. Of the 4 threads, only
62 * what connection/transaction it and other statements are executed in the
67 * query in the context of a separate connection. There is no point in executing
68 * multiple statements on the same connection; since only one statement per
69 * connection executes at a time, there will be no interleaving of execution
146 private static void exec(Connection connection, String queryString, argument
150 statement = connection.createStatement();
175 private static void exec(Connection connection, String queryString) argument
177 exec(connection, queryStrin
[all...]
/dalvik/libcore/luni/src/test/java/org/apache/harmony/luni/tests/java/net/
H A DURLConnectionTest.java139 // state of connection is checked first
179 // state of connection is checked first
464 HttpURLConnection connection = (HttpURLConnection)
468 connection.setDoOutput(true);
470 = new OutputStreamWriter(connection.getOutputStream());
473 assertEquals(200, connection.getResponseCode());
885 // Recreate the connection so that we get the cache from ResponseCache.
1282 assertTrue("Not more than one header in URL connection",
1805 URLConnection connection = url.openConnection();
1811 connection
[all...]

Completed in 144 milliseconds