PageRenderTime 27ms CodeModel.GetById 25ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/lib/src/org/apache/http/conn/package.html

http://github.com/onedanshow/Screen-Courter
HTML | 80 lines | 51 code | 1 blank | 28 comment | 0 complexity | e69a4ea707ace13eeb52aa841d0cb62e MD5 | raw file
Possible License(s): GPL-3.0
 1<html>
 2<head>
 3<!--
 4/*
 5 * ====================================================================
 6 * Licensed to the Apache Software Foundation (ASF) under one
 7 * or more contributor license agreements.  See the NOTICE file
 8 * distributed with this work for additional information
 9 * regarding copyright ownership.  The ASF licenses this file
10 * to you under the Apache License, Version 2.0 (the
11 * "License"); you may not use this file except in compliance
12 * with the License.  You may obtain a copy of the License at
13 *
14 *   http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing,
17 * software distributed under the License is distributed on an
18 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19 * KIND, either express or implied.  See the License for the
20 * specific language governing permissions and limitations
21 * under the License.
22 * ====================================================================
23 *
24 * This software consists of voluntary contributions made by many
25 * individuals on behalf of the Apache Software Foundation.  For more
26 * information on the Apache Software Foundation, please see
27 * <http://www.apache.org/>.
28 *
29 */
30-->
31</head>
32<body>
33The client-side connection management and handling API that provides interfaces
34and implementations for opening and managing client side HTTP connections.
35<p>
36The lowest layer of connection handling is comprised of
37{@link org.apache.http.conn.OperatedClientConnection OperatedClientConnection}
38and
39{@link org.apache.http.conn.ClientConnectionOperator ClientConnectionOperator}.
40The connection interface extends the core
41{@link org.apache.http.HttpClientConnection HttpClientConnection}
42by operations to set and update a socket. An operator encapsulates the logic to
43open and layer sockets, typically using a
44{@link org.apache.http.conn.scheme.SocketFactory}. The socket factory for
45a protocol {@link org.apache.http.conn.scheme.Scheme} such as "http" or "https"
46can be looked up in a {@link org.apache.http.conn.scheme.SchemeRegistry}.
47Applications without a need for sophisticated connection management can use
48this layer directly.
49</p>
50<p>
51On top of that lies the connection management layer. A
52{@link org.apache.http.conn.ClientConnectionManager} internally manages
53operated connections, but hands out instances of
54{@link org.apache.http.conn.ManagedClientConnection}.
55This interface abstracts from the underlying socket operations and
56provides convenient methods for opening and updating sockets in order
57to establish a {@link org.apache.http.conn.routing.HttpRoute route}.
58The operator is encapsulated by the connection manager and called
59automatically.
60</p>
61<p>
62Connections obtained from a manager have to be returned after use.
63This can be {@link org.apache.http.conn.ConnectionReleaseTrigger triggered}
64on various levels, either by releasing the
65{@link org.apache.http.conn.ManagedClientConnection connection} directly,
66or by calling a method on
67an {@link org.apache.http.conn.BasicManagedEntity entity} received from
68the connection, or by closing the
69{@link org.apache.http.conn.EofSensorInputStream stream} from which
70that entity is being read.
71</p>
72<p>
73Connection managers will try to keep returned connections alive in
74order to re-use them for subsequent requests along the same route.
75The managed connection interface and all triggers for connection release
76provide methods to enable or disable this behavior.
77</p>
78
79</body>
80</html>