├── httpcore5
└── src
│ ├── test
│ ├── resources
│ │ ├── ca.p12
│ │ ├── test.p12
│ │ ├── test-client.p12
│ │ ├── test-server.p12
│ │ └── test-keypasswd.p12
│ └── java
│ │ └── org
│ │ └── apache
│ │ └── hc
│ │ └── core5
│ │ ├── util
│ │ └── TestTimeoutValueException.java
│ │ ├── http
│ │ └── config
│ │ │ └── TestRegistry.java
│ │ └── concurrent
│ │ └── TestCompletedFuture.java
│ └── main
│ ├── resources
│ └── org
│ │ └── apache
│ │ └── hc
│ │ └── core5
│ │ └── version.properties
│ └── java
│ └── org
│ └── apache
│ └── hc
│ └── core5
│ ├── util
│ ├── package-info.java
│ └── Identifiable.java
│ ├── io
│ ├── package-info.java
│ ├── CloseMode.java
│ ├── IOCallback.java
│ └── ModalCloseable.java
│ ├── http
│ ├── config
│ │ ├── package-info.java
│ │ └── Lookup.java
│ ├── nio
│ │ ├── ssl
│ │ │ ├── package-info.java
│ │ │ └── TlsUpgradeCapable.java
│ │ ├── support
│ │ │ ├── package-info.java
│ │ │ └── classic
│ │ │ │ ├── package-info.java
│ │ │ │ ├── TransportException.java
│ │ │ │ └── ProtocolException.java
│ │ ├── command
│ │ │ └── package-info.java
│ │ ├── entity
│ │ │ └── package-info.java
│ │ ├── NHttpMessageParserFactory.java
│ │ ├── NHttpMessageWriterFactory.java
│ │ └── AsyncDataExchangeHandler.java
│ ├── protocol
│ │ └── package-info.java
│ ├── impl
│ │ ├── package-info.java
│ │ ├── nio
│ │ │ ├── FlushMode.java
│ │ │ ├── MessageState.java
│ │ │ ├── package-info.java
│ │ │ └── HttpConnectionEventHandler.java
│ │ ├── bootstrap
│ │ │ ├── package-info.java
│ │ │ └── StandardFilter.java
│ │ └── io
│ │ │ ├── package-info.java
│ │ │ └── ResponseOutOfOrderException.java
│ ├── io
│ │ ├── package-info.java
│ │ ├── support
│ │ │ └── package-info.java
│ │ ├── entity
│ │ │ └── package-info.java
│ │ ├── HttpTransportMetrics.java
│ │ ├── HttpMessageWriterFactory.java
│ │ ├── ssl
│ │ │ └── SSLSessionVerifier.java
│ │ └── HttpResponseInformationCallback.java
│ ├── message
│ │ ├── package-info.java
│ │ └── ParserCursor.java
│ ├── ClassicHttpRequest.java
│ ├── ClassicHttpResponse.java
│ ├── support
│ │ └── Expectation.java
│ ├── StreamControl.java
│ ├── StreamClosedException.java
│ ├── HeaderElements.java
│ ├── NameValuePair.java
│ └── HttpStreamResetException.java
│ ├── net
│ ├── package-info.java
│ └── NamedEndpoint.java
│ ├── concurrent
│ ├── package-info.java
│ ├── FutureCallback.java
│ └── Cancellable.java
│ ├── function
│ ├── package-info.java
│ ├── Decorator.java
│ ├── Callback.java
│ ├── Resolver.java
│ ├── Factory.java
│ └── Supplier.java
│ ├── pool
│ ├── package-info.java
│ ├── ConnPoolStats.java
│ ├── PoolReusePolicy.java
│ ├── ManagedConnPool.java
│ ├── DisposalCallback.java
│ ├── PoolConcurrencyPolicy.java
│ └── ConnPoolListener.java
│ ├── reactor
│ ├── ssl
│ │ ├── package-info.java
│ │ ├── SSLMode.java
│ │ └── SSLBufferMode.java
│ ├── IOWorkerSelector.java
│ ├── package-info.java
│ ├── IOReactorService.java
│ ├── Command.java
│ ├── IOEventHandlerFactory.java
│ ├── IOReactorShutdownException.java
│ ├── IOWorkerStats.java
│ ├── IOReactorStatus.java
│ ├── ProtocolUpgradeHandler.java
│ └── IOSessionListener.java
│ ├── annotation
│ ├── package-info.java
│ ├── Experimental.java
│ └── Internal.java
│ └── ssl
│ ├── package-info.java
│ ├── SSLInitializationException.java
│ └── PrivateKeyStrategy.java
├── httpcore5-testing
└── src
│ ├── test
│ └── resources
│ │ ├── test.p12
│ │ ├── test-ca.jks
│ │ ├── test-client.p12
│ │ ├── test-server.p12
│ │ ├── docker
│ │ ├── server.p12
│ │ ├── nginx
│ │ │ ├── default.conf
│ │ │ ├── h2c.conf
│ │ │ └── ssl.conf
│ │ ├── httpd
│ │ │ ├── httpd-default.conf
│ │ │ ├── httpd-h2c.conf
│ │ │ └── httpd-ssl.conf
│ │ └── server-key.pem
│ │ ├── log4j2.xml
│ │ └── log4j2-debug.xml.template
│ └── main
│ └── java
│ └── org
│ └── apache
│ └── hc
│ └── core5
│ ├── benchmark
│ └── package-info.java
│ └── testing
│ ├── framework
│ └── ClassicTestClientTestingAdapter.java
│ └── classic
│ └── LoggingSupport.java
├── NOTICE.txt
├── .gitignore
├── test-CA
├── README.txt
├── ca-cert.pem
└── ca-key.pem
├── src
└── site
│ └── resources
│ └── css
│ └── site.css
├── CODE_OF_CONDUCT.md
├── .gitattributes
├── .mvn
└── wrapper
│ └── maven-wrapper.properties
├── SECURITY.md
├── .github
├── workflows
│ └── depsreview.yaml
└── dependabot.yml
├── httpcore5-h2
└── src
│ ├── main
│ └── java
│ │ └── org
│ │ └── apache
│ │ └── hc
│ │ └── core5
│ │ └── http2
│ │ ├── frame
│ │ ├── package-info.java
│ │ └── FrameConsts.java
│ │ ├── package-info.java
│ │ ├── config
│ │ └── package-info.java
│ │ ├── ssl
│ │ └── package-info.java
│ │ ├── protocol
│ │ └── package-info.java
│ │ ├── impl
│ │ ├── package-info.java
│ │ └── nio
│ │ │ ├── bootstrap
│ │ │ └── package-info.java
│ │ │ └── package-info.java
│ │ ├── nio
│ │ ├── pool
│ │ │ └── package-info.java
│ │ ├── support
│ │ │ └── package-info.java
│ │ ├── package-info.java
│ │ └── command
│ │ │ └── package-info.java
│ │ ├── hpack
│ │ ├── HPackRepresentation.java
│ │ ├── HPackEntry.java
│ │ ├── package-info.java
│ │ └── HPackException.java
│ │ ├── HttpVersionPolicy.java
│ │ ├── H2PseudoResponseHeaders.java
│ │ ├── H2TransportMetrics.java
│ │ ├── H2CorruptFrameException.java
│ │ └── H2PseudoRequestHeaders.java
│ └── test
│ └── java
│ └── org
│ └── apache
│ └── hc
│ └── core5
│ └── http2
│ └── frame
│ └── TestFrameFlag.java
└── BUILDING.txt
/httpcore5/src/test/resources/ca.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/httpcomponents-core/HEAD/httpcore5/src/test/resources/ca.p12
--------------------------------------------------------------------------------
/httpcore5/src/test/resources/test.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/httpcomponents-core/HEAD/httpcore5/src/test/resources/test.p12
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/test.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/httpcomponents-core/HEAD/httpcore5-testing/src/test/resources/test.p12
--------------------------------------------------------------------------------
/httpcore5/src/test/resources/test-client.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/httpcomponents-core/HEAD/httpcore5/src/test/resources/test-client.p12
--------------------------------------------------------------------------------
/httpcore5/src/test/resources/test-server.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/httpcomponents-core/HEAD/httpcore5/src/test/resources/test-server.p12
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/test-ca.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/httpcomponents-core/HEAD/httpcore5-testing/src/test/resources/test-ca.jks
--------------------------------------------------------------------------------
/httpcore5/src/test/resources/test-keypasswd.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/httpcomponents-core/HEAD/httpcore5/src/test/resources/test-keypasswd.p12
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/test-client.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/httpcomponents-core/HEAD/httpcore5-testing/src/test/resources/test-client.p12
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/test-server.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/httpcomponents-core/HEAD/httpcore5-testing/src/test/resources/test-server.p12
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/docker/server.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/apache/httpcomponents-core/HEAD/httpcore5-testing/src/test/resources/docker/server.p12
--------------------------------------------------------------------------------
/NOTICE.txt:
--------------------------------------------------------------------------------
1 | Apache HttpComponents Core
2 | Copyright 2005-2024 The Apache Software Foundation
3 |
4 | This product includes software developed at
5 | The Apache Software Foundation (http://www.apache.org/).
6 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .classpath
2 | .project
3 | .settings
4 | .pydevproject
5 | .clover
6 | target
7 | maven-eclipse.xml
8 | .idea
9 | *.iml
10 | **/log4j2-debug.xml
11 | **/.checkstyle
12 | /test-CA/newcerts/
13 | /test-CA/serial.txt*
14 | /test-CA/index.txt*
15 |
--------------------------------------------------------------------------------
/test-CA/README.txt:
--------------------------------------------------------------------------------
1 | This directory contains CA key and certificate for unit and integration tests
2 | ---
3 |
4 | Use this command to check the private key
5 | Passphrase: nopassword
6 | ---
7 | openssl rsa -in ca-key.pem -check -text -noout
8 | ---
9 |
10 | Use this command to print CA certificate details
11 | ---
12 | openssl x509 -in ca-cert.pem -text -noout
13 | ---
--------------------------------------------------------------------------------
/src/site/resources/css/site.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Licensed to the Apache Software Foundation (ASF) under one
3 | * or more contributor license agreements. See the NOTICE file
4 | * distributed with this work for additional information
5 | * regarding copyright ownership. The ASF licenses this file
6 | * to you under the Apache License, Version 2.0 (the
7 | * "License"); you may not use this file except in compliance
8 | * with the License. You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing,
13 | * software distributed under the License is distributed on an
14 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | * KIND, either express or implied. See the License for the
16 | * specific language governing permissions and limitations
17 | * under the License.
18 | */
19 | @import url("/css/hc-maven.css");
20 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 |
17 | The Apache code of conduct page is [https://www.apache.org/foundation/policies/conduct.html](https://www.apache.org/foundation/policies/conduct.html).
18 |
--------------------------------------------------------------------------------
/httpcore5/src/main/resources/org/apache/hc/core5/version.properties:
--------------------------------------------------------------------------------
1 | #
2 | # Licensed to the Apache Software Foundation (ASF) under one
3 | # or more contributor license agreements. See the NOTICE file
4 | # distributed with this work for additional information
5 | # regarding copyright ownership. The ASF licenses this file
6 | # to you under the Apache License, Version 2.0 (the
7 | # "License"); you may not use this file except in compliance
8 | # with the License. You may obtain a copy of the License at
9 | #
10 | # http://www.apache.org/licenses/LICENSE-2.0
11 | #
12 | # Unless required by applicable law or agreed to in writing,
13 | # software distributed under the License is distributed on an
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 | # KIND, either express or implied. See the License for the
16 | # specific language governing permissions and limitations
17 | # under the License.
18 | #
19 | info.module = ${project.artifactId}
20 | info.release = ${project.version}
21 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # Auto detect text files and perform LF normalization
18 | * text=auto
19 |
20 | *.java text diff=java
21 | *.html text diff=html
22 | *.css text
23 | *.js text
24 |
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | distributionSha256Sum=0d7125e8c91097b36edb990ea5934e6c68b4440eef4ea96510a0f6815e7eeadb
18 | distributionType=only-script
19 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
20 | wrapperVersion=3.3.2
21 |
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/docker/nginx/default.conf:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | server {
17 | listen 80;
18 | server_name localhost;
19 |
20 | location / {
21 | root /var/nginx/www;
22 | }
23 |
24 | error_page 500 502 503 504 /50x.html;
25 | location = /50x.html {
26 | root /usr/share/nginx/html;
27 | }
28 |
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 |
19 |
20 | # HttpComponents Security
21 |
22 | The HttpComponents Security process and model are on our website's [Security](https://hc.apache.org/security.html) page.
23 |
24 | If you believe you found a vulnerability in Apache HttpClient, please contact the [Apache Security Team](https://www.apache.org/security/).
25 |
--------------------------------------------------------------------------------
/.github/workflows/depsreview.yaml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | name: 'Dependency Review'
19 | on: [pull_request]
20 |
21 | permissions:
22 | contents: read
23 |
24 | jobs:
25 | dependency-review:
26 | runs-on: ubuntu-latest
27 | steps:
28 | - name: 'Checkout Repository'
29 | uses: actions/checkout@v6
30 | - name: 'Dependency Review'
31 | uses: actions/dependency-review-action@v4
32 |
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/docker/httpd/httpd-default.conf:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 |
17 | AllowOverride none
18 | Require all denied
19 |
20 |
21 | DocumentRoot "/var/httpd/www"
22 |
23 | Options Indexes FollowSymLinks
24 | AllowOverride None
25 | Require all granted
26 |
27 |
28 |
29 | ServerName localhost:80
30 | Protocols http/1.1
31 |
32 |
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/docker/httpd/httpd-h2c.conf:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | Listen 81
17 |
18 |
19 | ServerName localhost:81
20 | Protocols h2c
21 |
22 |
23 | LogLevel http2:info
24 | H2Push on
25 | H2EarlyHints on
26 |
27 |
28 | H2PushResource /aaa
29 | H2PushResource /bbb
30 | H2PushResource /ccc
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/docker/nginx/h2c.conf:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | server {
17 | listen 81 http2;
18 | server_name localhost;
19 |
20 | location / {
21 | root /var/nginx/www;
22 |
23 | location = /pushy {
24 | http2_push "/aaa";
25 | http2_push "/bbb";
26 | http2_push "/ccc";
27 | }
28 | }
29 |
30 | error_page 500 502 503 504 /50x.html;
31 | location = /50x.html {
32 | root /usr/share/nginx/html;
33 | }
34 |
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/log4j2.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 |
18 | # For most projects, this workflow file will not need changing; you simply need
19 | # to commit it to your repository.
20 | #
21 | # You may wish to alter this file to override the set of languages analyzed,
22 | # or to provide custom queries or build logic.
23 |
24 | version: 2
25 | updates:
26 | - package-ecosystem: "maven"
27 | directory: "/"
28 | schedule:
29 | interval: "weekly"
30 | day: "friday"
31 | - package-ecosystem: "github-actions"
32 | directory: "/"
33 | schedule:
34 | interval: "weekly"
35 | day: "friday"
36 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/util/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Core utility classes.
30 | */
31 | package org.apache.hc.core5.util;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/io/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Core I/O component APIs and utilities.
30 | */
31 | package org.apache.hc.core5.io;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/config/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Core configuration APIs.
30 | */
31 | package org.apache.hc.core5.http.config;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * TLS protocol support.
30 | */
31 | package org.apache.hc.core5.http.nio.ssl;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/net/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Core network component APIs and utilities.
30 | */
31 | package org.apache.hc.core5.net;
32 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/frame/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Core HTTP/2 data frame APIs.
30 | */
31 | package org.apache.hc.core5.http2.frame;
32 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Core HTTP/2 transport component APIs.
30 | */
31 | package org.apache.hc.core5.http2;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/concurrent/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Core concurrency component APIs.
30 | */
31 | package org.apache.hc.core5.concurrent;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/function/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Commonly used functional interfaces.
30 | */
31 | package org.apache.hc.core5.function;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/pool/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Client side connection pool component APIs.
30 | */
31 | package org.apache.hc.core5.pool;
32 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/config/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Core HTTP/2 configuration APIs.
30 | */
31 | package org.apache.hc.core5.http2.config;
32 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/ssl/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * HTTP/2 specific TLS protocol support.
30 | */
31 | package org.apache.hc.core5.http2.ssl;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Core HTTP protocol interceptors.
30 | */
31 | package org.apache.hc.core5.http.protocol;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * TLS/SSL support for I/O reactors.
30 | */
31 | package org.apache.hc.core5.reactor.ssl;
32 |
--------------------------------------------------------------------------------
/BUILDING.txt:
--------------------------------------------------------------------------------
1 | Building HttpComponents Core
2 | ============================
3 |
4 | (1) Requisites
5 | --------------
6 | JDK 1.7+ is required in order to compile and run HttpCore.
7 |
8 | HttpCore utilizes Maven as a distribution management and packaging tool.
9 | Version 3.3 or later is required.
10 |
11 | Maven installation and configuration instructions can be found here:
12 |
13 | http://maven.apache.org/run-maven/index.html
14 |
15 | (2) Executing test cases
16 |
17 | Execute the following command in order to compile and test the components:
18 |
19 | mvn test
20 |
21 | To avoid intermittent test failures, it is recommended to have a machine or virtual machine with the following specifications:
22 |
23 | Minimum of 2 CPUs.
24 | Minimum of 2GB of RAM.
25 |
26 | These are the minimal requirements for stable test execution. In more resource constrained environments some tests may fail intermittently.
27 |
28 |
29 | (3) Building packages
30 |
31 | Execute the following command in order to build the JAR packages and install
32 | them to the local repository:
33 |
34 | mvn install
35 |
36 | The JAR packages can be found in the target folders of their respective modules
37 |
38 | httpcore5/target/httpcore5-.jar
39 | httpcore5-h2/target/httpcore5-h2-.jar
40 | httpcore5-testing/target/httpcore5-testing-.jar
41 | httpcore5-osgi/target/org.apache.httpcomponents.httpcore_.jar
42 |
43 | where is the release version
44 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/protocol/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * HTTP/2 protocol interceptors.
30 | */
31 | package org.apache.hc.core5.http2.protocol;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/impl/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Default implementations of core HTTP APIs.
30 | */
31 | package org.apache.hc.core5.http.impl;
32 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Default implementations of core HTTP/2 APIs.
30 | */
31 | package org.apache.hc.core5.http2.impl;
32 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/pool/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * HTTP/2 specific pool component APIs.
30 | */
31 | package org.apache.hc.core5.http2.nio.pool;
32 |
--------------------------------------------------------------------------------
/httpcore5-testing/src/main/java/org/apache/hc/core5/benchmark/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Apache Bench (AB) clone based on HttpCore.
30 | */
31 | package org.apache.hc.core5.benchmark;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/FlushMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.http.impl.nio;
28 |
29 | enum FlushMode {
30 |
31 | IMMEDIATE, BUFFER
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/MessageState.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.http.impl.nio;
28 |
29 | public enum MessageState { IDLE, HEADERS, ACK, BODY, COMPLETE }
30 |
--------------------------------------------------------------------------------
/test-CA/ca-cert.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDyTCCArGgAwIBAgIJAO3mCIu9mboMMA0GCSqGSIb3DQEBCwUAMHoxIzAhBgNV
3 | BAoMGkFwYWNoZSBTb2Z0d2FyZSBGb3VuZGF0aW9uMR8wHQYDVQQLDBZIdHRwQ29t
4 | cG9uZW50cyBQcm9qZWN0MRAwDgYDVQQDDAdUZXN0IENBMSAwHgYJKoZIhvcNAQkB
5 | FhFkZXZAaGMuYXBhY2hlLm9yZzAgFw0xNDEwMTMxNTAxMjBaGA8yMjg4MDcyODE1
6 | MDEyMFowejEjMCEGA1UECgwaQXBhY2hlIFNvZnR3YXJlIEZvdW5kYXRpb24xHzAd
7 | BgNVBAsMFkh0dHBDb21wb25lbnRzIFByb2plY3QxEDAOBgNVBAMMB1Rlc3QgQ0Ex
8 | IDAeBgkqhkiG9w0BCQEWEWRldkBoYy5hcGFjaGUub3JnMIIBIjANBgkqhkiG9w0B
9 | AQEFAAOCAQ8AMIIBCgKCAQEApXhHtKRvAxbLI+f21zNe68dkVXAhSMIfHQJGb2en
10 | S1H8yE4HPIb4vPQ0U7fQCb7RXplm6cHExpof4cO3DmyqD5KeQk0TdM8XrhviDgwj
11 | Y0KQ/lgwGHR5CpYoZ6LYWaLSE/wt9dVu80UcK8a3hW9G0X/4b79fMO6HYDix+CI4
12 | b17sqZ4K0tWKA10Xe+2RJU8Y01pPBaPR/UsAn+a1pZ6f8BhL879oWHfLWKcgZOYP
13 | U4sYED0S8gs4/ED1zRj2/uHb313sHTl+OU4X5v+OvwBvbNBrl5qfMTZnRNxlOfRq
14 | UTJdcopsp2aNeqHiorSDOrHwMIJpxQ2XqHT2l9s8msXf4wIDAQABo1AwTjAdBgNV
15 | HQ4EFgQUA+Tn2g9k2xMevYWrdrwpyi+nx0swHwYDVR0jBBgwFoAUA+Tn2g9k2xMe
16 | vYWrdrwpyi+nx0swDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEAFVEp
17 | 8Nv6JoFY7oGgu6068fH/kq7A3SllqMpbv7dddI9fgwy352cBtg6PkYkGtEE037xs
18 | FQSYV1NiAkNWTJER+Q+kVbQrhuPNKZqh1g0sUKwv3X20BmgJ9hbU9klWZjdjujyd
19 | h9Ybjuntkn5XPp1zN6zHD0sQReEJnRlD6FT1axrQWpICzE4qoo8k64G+6/rqFywc
20 | oMc/Of3KCAHjtbWklEu97hjBvGC/nEP4/VhRrjWWSeGHv88LCyO/Yg6v3zrZHFLW
21 | +KhsDCPyLxSSISFskLQfukiqf2lr87kQq/oF27sAr3sR3Jqh4qzflM2XLgjmZuRE
22 | OrHT6lvUemRyksA5qg==
23 | -----END CERTIFICATE-----
24 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/annotation/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Provides annotations for public interface definitions
30 | */
31 | package org.apache.hc.core5.annotation;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * HTTP/1.1 requester and server bootstrap.
30 | */
31 | package org.apache.hc.core5.http.impl.bootstrap;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/io/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Core HTTP transport APIs based on the classic (blocking) I/O model.
30 | */
31 | package org.apache.hc.core5.http.io;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/io/support/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Support classes for the classic (blocking) I/O model.
30 | */
31 | package org.apache.hc.core5.http.io.support;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Support classes for the asynchronous I/O model.
30 | */
31 | package org.apache.hc.core5.http.nio.support;
32 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/hpack/HPackRepresentation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http2.hpack;
29 |
30 | enum HPackRepresentation { WITH_INDEXING, WITHOUT_INDEXING, NEVER_INDEXED }
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/support/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Support classes for HTTP/2 asynchronous transport.
30 | */
31 | package org.apache.hc.core5.http2.nio.support;
32 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/bootstrap/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * HTTP/2 capable requester and server bootstrap.
30 | */
31 | package org.apache.hc.core5.http2.impl.nio.bootstrap;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/io/entity/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * HTTP message entity APIs based on the classic (blocking) I/O model.
30 | */
31 | package org.apache.hc.core5.http.io.entity;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/ssl/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Utility classes for trust and key material management
30 | * and TLS/SSL context initialization.
31 | */
32 | package org.apache.hc.core5.ssl;
33 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/nio/command/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Commands for HTTP transports based on asynchronous, event driven I/O model.
30 | */
31 | package org.apache.hc.core5.http.nio.command;
32 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/nio/entity/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * HTTP message entity APIs based on the asynchronous (non-blocking) I/O model.
30 | */
31 | package org.apache.hc.core5.http.nio.entity;
32 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * HTTP/2 transport specific APIs based on the asynchronous,
30 | * event driven I/O model.
31 | */
32 | package org.apache.hc.core5.http2.nio;
33 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.reactor.ssl;
29 |
30 | /**
31 | * @since 4.2
32 | */
33 | public enum SSLMode {
34 |
35 | CLIENT,
36 | SERVER
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/hpack/HPackEntry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http2.hpack;
29 |
30 | interface HPackEntry {
31 |
32 | int getIndex();
33 |
34 | HPackHeader getHeader();
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Default implementation of HTTP/1.1 transport based on the classic
30 | * (blocking) I/O model.
31 | */
32 | package org.apache.hc.core5.http.impl.io;
33 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/reactor/ssl/SSLBufferMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.reactor.ssl;
29 |
30 | /**
31 | * @since 5.0
32 | */
33 | public enum SSLBufferMode {
34 |
35 | STATIC,
36 | DYNAMIC
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Default implementation of HTTP/2 transport based on
30 | * the asynchronous (non-blocking) I/O model.
31 | */
32 | package org.apache.hc.core5.http2.impl.nio;
33 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Default implementation of HTTP/1.1 transport based on
30 | * the asynchronous (non-blocking) I/O model.
31 | */
32 | package org.apache.hc.core5.http.impl.nio;
33 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/io/CloseMode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.io;
29 |
30 | /**
31 | * Close operation mode.
32 | *
33 | * @since 5.0
34 | */
35 | public enum CloseMode {
36 |
37 | IMMEDIATE, GRACEFUL
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/nio/command/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * HTTP/2 specific commands for HTTP/2 transport based
30 | * on asynchronous, event driven I/O model.
31 | */
32 | package org.apache.hc.core5.http2.nio.command;
33 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/message/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Core HTTP message components, message element parser
30 | * and writer APIs and their default implementations.
31 | */
32 | package org.apache.hc.core5.http.message;
33 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/util/Identifiable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.util;
29 |
30 | /**
31 | * Object with a unique identifier.
32 | *
33 | * @since 5.0
34 | */
35 | public interface Identifiable {
36 |
37 | String getId();
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/classic/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Support classes for the asynchronous I/O model that emulate
30 | * behavior of the classic (blocking) I/O model.
31 | */
32 | package org.apache.hc.core5.http.nio.support.classic;
33 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/HttpVersionPolicy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.http2;
28 |
29 | /**
30 | * HTTP protocol version policy.
31 | *
32 | * @since 5.0
33 | */
34 | public enum HttpVersionPolicy {
35 |
36 | FORCE_HTTP_1, FORCE_HTTP_2, NEGOTIATE
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/docker/nginx/ssl.conf:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | server {
17 | listen 443 ssl http2;
18 | server_name localhost;
19 | ssl_certificate /etc/nginx/server-cert.pem;
20 | ssl_certificate_key /etc/nginx/server-key.pem;
21 | ssl_protocols TLSv1.2 TLSv1.3;
22 | ssl_ciphers HIGH:!aNULL:!MD5;
23 |
24 | location / {
25 | root /var/nginx/www;
26 |
27 | location = /pushy {
28 | http2_push "/aaa";
29 | http2_push "/bbb";
30 | http2_push "/ccc";
31 | }
32 | }
33 |
34 | error_page 500 502 503 504 /50x.html;
35 | location = /50x.html {
36 | root /usr/share/nginx/html;
37 | }
38 |
39 | }
40 |
41 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/hpack/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * HTTP/2 HPACK APIs.
30 | *
31 | * This Huffman codec implementation has been derived from Twitter HPack project
32 | * (https://github.com/twitter/hpack)
33 | *
34 | */
35 | package org.apache.hc.core5.http2.hpack;
36 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOWorkerSelector.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.reactor;
29 |
30 | import org.apache.hc.core5.annotation.Internal;
31 |
32 | @Internal
33 | @FunctionalInterface
34 | public interface IOWorkerSelector {
35 |
36 | int select(IOWorkerStats[] dispatchers);
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/reactor/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | /**
29 | * Event driven network communication APIs and components loosely based on
30 | Doug Lea's
31 | reactor pattern.
32 | */
33 | package org.apache.hc.core5.reactor;
34 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/function/Decorator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.function;
29 |
30 | /**
31 | * Abstract decorator.
32 | *
33 | * @param The type of object to decorate.
34 | * @since 5.0
35 | */
36 | @FunctionalInterface
37 | public interface Decorator {
38 |
39 | T decorate(T object);
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/ClassicHttpRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http;
29 |
30 | /**
31 | * 'Classic' {@link HttpRequest} message that can enclose {@link HttpEntity}.
32 | *
33 | * @since 5.0
34 | */
35 | public interface ClassicHttpRequest extends HttpRequest, HttpEntityContainer {
36 | // empty
37 | }
38 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/function/Callback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.function;
29 |
30 | /**
31 | * Abstract callback.
32 | *
33 | * @param The type of object consumed by the callback.
34 | * @since 5.0
35 | */
36 | @FunctionalInterface
37 | public interface Callback {
38 |
39 | void execute(T object);
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/H2PseudoResponseHeaders.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http2;
29 |
30 | /**
31 | * Response pseudo HTTP headers defined by the HTTP/2 specification.
32 | *
33 | * @since 5.0
34 | */
35 | public final class H2PseudoResponseHeaders {
36 |
37 | public static final String STATUS = ":status";
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/framework/ClassicTestClientTestingAdapter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.testing.framework;
29 |
30 | public class ClassicTestClientTestingAdapter extends ClientTestingAdapter {
31 |
32 | public ClassicTestClientTestingAdapter() {
33 | super(new ClassicTestClientAdapter());
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOReactorService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.reactor;
29 |
30 | /**
31 | * {@link IOReactor} running as a service.
32 | *
33 | * @since 5.0
34 | */
35 | public interface IOReactorService extends IOReactor {
36 |
37 | /**
38 | * Starts I/O reactor.
39 | */
40 | void start();
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/impl/bootstrap/StandardFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.impl.bootstrap;
29 |
30 | /**
31 | * Filters supported by async and classic server implementations
32 | *
33 | * @see AsyncServerBootstrap
34 | * @see ServerBootstrap
35 | */
36 | public enum StandardFilter {
37 |
38 | EXPECT_CONTINUE, MAIN_HANDLER
39 |
40 | }
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/io/IOCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.io;
29 |
30 | import java.io.IOException;
31 |
32 | /**
33 | * Abstract I/O callback.
34 | *
35 | * @param the type of the input to the operation.
36 | * @since 5.0
37 | */
38 | public interface IOCallback {
39 |
40 | void execute(T object) throws IOException;
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/function/Resolver.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.function;
29 |
30 | /**
31 | * Abstract resolver from input to output.
32 | *
33 | * @param the input type.
34 | * @param the output type.
35 | * @since 5.0
36 | */
37 | @FunctionalInterface
38 | public interface Resolver {
39 |
40 | O resolve(I object);
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/ClassicHttpResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http;
29 |
30 | import java.io.Closeable;
31 |
32 | /**
33 | * 'Classic' {@link HttpResponse} message that can enclose {@link HttpEntity}.
34 | *
35 | * @since 5.0
36 | */
37 | public interface ClassicHttpResponse extends HttpResponse, HttpEntityContainer, Closeable {
38 | // empty
39 | }
40 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/support/Expectation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.http.support;
28 |
29 | import org.apache.hc.core5.annotation.Internal;
30 |
31 | /**
32 | * Message expectations. Presently only {@literal 100-continue} is recognized.
33 | *
34 | * @since 5.3
35 | */
36 | @Internal
37 | public enum Expectation {
38 |
39 | CONTINUE, UNKNOWN
40 |
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/function/Factory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.function;
29 |
30 | /**
31 | * Abstract object factory.
32 | *
33 | * @param
The factory's input type.
34 | * @param The type of object produced by this factory.
35 | * @since 5.0
36 | */
37 | @FunctionalInterface
38 | public interface Factory
{
39 |
40 | T create(P parameter);
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/H2TransportMetrics.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http2;
29 |
30 | import org.apache.hc.core5.http.io.HttpTransportMetrics;
31 |
32 | /**
33 | * The point of access to connection statistics.
34 | *
35 | * @since 5.0
36 | */
37 | public interface H2TransportMetrics extends HttpTransportMetrics {
38 |
39 | long getFramesTransferred();
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/nio/NHttpMessageParserFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.nio;
29 |
30 | import org.apache.hc.core5.http.MessageHeaders;
31 |
32 | /**
33 | * Factory for {@link NHttpMessageParser} instances.
34 | *
35 | * @since 4.3
36 | */
37 | public interface NHttpMessageParserFactory {
38 |
39 | NHttpMessageParser create();
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/nio/NHttpMessageWriterFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.nio;
29 |
30 | import org.apache.hc.core5.http.MessageHeaders;
31 |
32 | /**
33 | * Factory for {@link NHttpMessageWriter} instances.
34 | *
35 | * @since 4.3
36 | */
37 | public interface NHttpMessageWriterFactory {
38 |
39 | NHttpMessageWriter create();
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/ssl/SSLInitializationException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.ssl;
28 |
29 | public class SSLInitializationException extends IllegalStateException {
30 |
31 | private static final long serialVersionUID = -8243587425648536702L;
32 |
33 | public SSLInitializationException(final String message, final Throwable cause) {
34 | super(message, cause);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpTransportMetrics.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.io;
29 |
30 | /**
31 | * Transport level metrics.
32 | *
33 | * @since 4.0
34 | */
35 | public interface HttpTransportMetrics {
36 |
37 | /**
38 | * Gets the number of bytes transferred.
39 | *
40 | * @return the number of bytes transferred.
41 | */
42 | long getBytesTransferred();
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/function/Supplier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.function;
29 |
30 | /**
31 | * Represents a supplier of results.
32 | *
33 | * @param the type of results supplied by this supplier.
34 | * @since 5.0
35 | */
36 | @FunctionalInterface
37 | public interface Supplier {
38 |
39 | /**
40 | * Gets a result.
41 | *
42 | * @return a result
43 | */
44 | T get();
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/pool/ConnPoolStats.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.pool;
28 |
29 | /**
30 | * Interface to obtain connection pool statistics.
31 | *
32 | * @param the route type that represents the opposite endpoint of a pooled
33 | * connection.
34 | * @since 4.2
35 | */
36 | public interface ConnPoolStats {
37 |
38 | PoolStats getTotalStats();
39 |
40 | PoolStats getStats(final T route);
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/reactor/Command.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.reactor;
29 |
30 | import org.apache.hc.core5.concurrent.Cancellable;
31 |
32 | /**
33 | * Abstract command {@link IOSession} can act upon. Pending commands
34 | * can be cancelled with {@link Cancellable#cancel()}.
35 | *
36 | * @since 5.0
37 | */
38 | public interface Command extends Cancellable {
39 |
40 | enum Priority { NORMAL, IMMEDIATE }
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpMessageWriterFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.io;
29 |
30 | import org.apache.hc.core5.http.MessageHeaders;
31 |
32 | /**
33 | * Factory for {@link HttpMessageWriter} instances.
34 | *
35 | * @param The type of {@link MessageHeaders}.
36 | * @since 4.3
37 | */
38 | public interface HttpMessageWriterFactory {
39 |
40 | HttpMessageWriter create();
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/classic/TransportException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.nio.support.classic;
29 |
30 | import java.io.IOException;
31 |
32 | import org.apache.hc.core5.annotation.Internal;
33 |
34 | /**
35 | * @since 5.4
36 | */
37 | @Internal
38 | public class TransportException extends IOException {
39 |
40 | public TransportException(final IOException ex) {
41 | super(ex);
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/H2CorruptFrameException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.http2;
28 |
29 | import java.io.IOException;
30 |
31 | /**
32 | * Signals corrupt HTTP/2 frame.
33 | *
34 | * @since 5.0
35 | */
36 | public class H2CorruptFrameException extends IOException {
37 |
38 | private static final long serialVersionUID = 1L;
39 |
40 | public H2CorruptFrameException(final String message) {
41 | super(message);
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/test/java/org/apache/hc/core5/http2/frame/TestFrameFlag.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.http2.frame;
28 |
29 | import org.junit.jupiter.api.Assertions;
30 | import org.junit.jupiter.api.Test;
31 |
32 | class TestFrameFlag {
33 |
34 | @Test
35 | void testFrameFlagBasics() {
36 |
37 | final int flags = FrameFlag.of(FrameFlag.END_STREAM, FrameFlag.PADDED, FrameFlag.PRIORITY);
38 | Assertions.assertEquals(0x01 | 0x08 | 0x20, flags);
39 | }
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOEventHandlerFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.reactor;
29 |
30 | import org.apache.hc.core5.annotation.Internal;
31 |
32 | /**
33 | * Factory interface to create {@link IOEventHandler} instances for the given connected endpoints.
34 | *
35 | * @since 5.0
36 | */
37 | @Internal
38 | public interface IOEventHandlerFactory {
39 |
40 | IOEventHandler createHandler(ProtocolIOSession ioSession, Object attachment);
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/concurrent/FutureCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.concurrent;
28 |
29 | /**
30 | * A callback interface that gets invoked upon completion of a {@link java.util.concurrent.Future}.
31 | *
32 | * @param the future result type consumed by this callback.
33 | * @since 4.2
34 | */
35 | public interface FutureCallback {
36 |
37 | void completed(T result);
38 |
39 | void failed(Exception ex);
40 |
41 | void cancelled();
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/httpcore5/src/test/java/org/apache/hc/core5/util/TestTimeoutValueException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.util;
29 |
30 | import org.junit.jupiter.api.Assertions;
31 | import org.junit.jupiter.api.Test;
32 |
33 | class TestTimeoutValueException {
34 |
35 | @Test
36 | void testMessage() {
37 | Assertions.assertEquals("Timeout deadline: 1000 MILLISECONDS, actual: 2000 MILLISECONDS",
38 | TimeoutValueException.fromMilliseconds(1000, 2000).getMessage());
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/StreamControl.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http;
29 |
30 | import org.apache.hc.core5.annotation.Internal;
31 | import org.apache.hc.core5.concurrent.Cancellable;
32 |
33 | /**
34 | * Represents a message stream control interface.
35 | *
36 | * @since 5.5
37 | */
38 | @Internal
39 | public interface StreamControl extends Cancellable {
40 |
41 | enum State { RESERVED, OPEN, CLOSED }
42 |
43 | int getId();
44 |
45 | State getState();
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/config/Lookup.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.config;
29 |
30 |
31 | /**
32 | * Generic lookup by lower-case string ID.
33 | *
34 | * @param the type of values to lookup.
35 | * @since 4.3
36 | */
37 | public interface Lookup {
38 |
39 | /**
40 | * Looks up a value using a lower-case string ID.
41 | *
42 | * @param name The lookup name.
43 | * @return The matching value.
44 | */
45 | I lookup(String name);
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/nio/support/classic/ProtocolException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.nio.support.classic;
29 |
30 | import java.io.IOException;
31 |
32 | import org.apache.hc.core5.annotation.Internal;
33 | import org.apache.hc.core5.http.HttpException;
34 |
35 | /**
36 | * @since 5.4
37 | */
38 | @Internal
39 | public class ProtocolException extends IOException {
40 |
41 | public ProtocolException(final HttpException ex) {
42 | super(ex);
43 | }
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/log4j2-debug.xml.template:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOReactorShutdownException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.reactor;
29 |
30 | /**
31 | * Signals the I/O reactor has been shut down or is in the process of shutting down.
32 | *
33 | * @since 5.0
34 | */
35 | public class IOReactorShutdownException extends IllegalStateException {
36 |
37 | private static final long serialVersionUID = 1L;
38 |
39 | public IOReactorShutdownException(final String message) {
40 | super(message);
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/H2PseudoRequestHeaders.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http2;
29 |
30 | /**
31 | * Request pseudo HTTP headers defined by the HTTP/2 specification.
32 | *
33 | * @since 5.0
34 | */
35 | public final class H2PseudoRequestHeaders {
36 |
37 | public static final String METHOD = ":method";
38 | public static final String SCHEME = ":scheme";
39 | public static final String AUTHORITY = ":authority";
40 | public static final String PATH = ":path";
41 |
42 | }
43 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/impl/nio/HttpConnectionEventHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.http.impl.nio;
28 |
29 | import org.apache.hc.core5.annotation.Internal;
30 | import org.apache.hc.core5.http.HttpConnection;
31 | import org.apache.hc.core5.reactor.IOEventHandler;
32 |
33 | /**
34 | * {@link IOEventHandler} that also exposes {@link HttpConnection} properties.
35 | *
36 | * @since 5.0
37 | */
38 | @Internal
39 | public interface HttpConnectionEventHandler extends IOEventHandler, HttpConnection {
40 | }
41 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/io/ssl/SSLSessionVerifier.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.io.ssl;
29 |
30 | import javax.net.ssl.SSLException;
31 | import javax.net.ssl.SSLSession;
32 |
33 | import org.apache.hc.core5.http.HttpHost;
34 |
35 | /**
36 | * Callback interface that can be used to customize TLS/SSL session verification.
37 | *
38 | * @since 5.0
39 | */
40 | public interface SSLSessionVerifier {
41 |
42 | void verify(HttpHost endpoint, SSLSession sslSession) throws SSLException;
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/pool/PoolReusePolicy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.pool;
28 |
29 | /**
30 | * Enumeration of pooled connection re-use policies
31 | *
32 | * @since 5.0
33 | */
34 | public enum PoolReusePolicy {
35 |
36 | /**
37 | * Re-use as few connections as possible making it possible for connections to become idle and expire.
38 | */
39 | LIFO,
40 |
41 | /**
42 | * Re-use all connections equally preventing them from becoming idle and expiring.
43 | */
44 | FIFO
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/ssl/PrivateKeyStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.ssl;
28 |
29 | import java.util.Map;
30 |
31 | import javax.net.ssl.SSLParameters;
32 |
33 | /**
34 | * A strategy allowing for a choice of an alias during SSL authentication.
35 | *
36 | * @since 4.4
37 | */
38 | public interface PrivateKeyStrategy {
39 |
40 | /**
41 | * Determines what key material to use for SSL authentication.
42 | */
43 | String chooseAlias(Map aliases, SSLParameters sslParameters);
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/docker/server-key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN PRIVATE KEY-----
2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDJDWbcnJxXQ4PO
3 | CgnWWLMFPu3IxLk+eWYi3Cmbpo7MIrY9ltkReBzNczd6W6aRMk3EEe7Ql11OiQ/H
4 | y3lA5B7S1/hPDzd+BHGpdEDmFxyUZfkTDVK8dP5t5q3wB2CB4H65jFKLyuwvBJ9e
5 | 5SomcG3paPGejNAGL1DumAPZuoJbZQGAYBMJ2mS+rnbE7lwF/V01/X6RKSJd8hgv
6 | Sfn5wHGghSZgCdZWQikzlVvi2AKviQL2AafLvJC7IB5t7p/AriTfvjBciV3BpCGh
7 | Bol1ChbzNO/8o6Z9nGqXKFkeFph5oX6zCmN+LU1s60DGyepjAQJ4SkrrmIxh19bf
8 | ms+kjDIhAgMBAAECggEAMWAwNdfkcW3sTcqbVd/cv1oQDbF6iQRJeCA3u7kw8qNH
9 | vGJylt63vCEiq9McWiZPgOqiiunRiXsRvBCVi8E6bK+LlOb4yuMOgv5A/gEJDMzq
10 | Wap4+j2FSrpPV1aIdf0LQkha8Wf5jyaEeUqwilYsOBmE1VphsFMofiApOeybHRSG
11 | 1PWcPXUYv/ylLHdEKJOy0eKgIkCSHfIyPzGVvVpfKCQYu9qQSXpx9ivNNvIrjgPZ
12 | i5lP3yYm7SKKGTb2J6eYsSVfvH8Q1bob8EV0ZJKfbqioZmwIQ0F+UCjR4j5HbYUR
13 | ygz2FQn9nOAqJaHbeKIj/qRi1V768TXMbW3H7cW5/QKBgQDkubAgEVhLwWJk8bTm
14 | sfrCpLkRaL0Dzen021sX9R5g3ajofL7INtDiCeP/5HSo8ffQdY9Q4CJjS12ekdjA
15 | F5sDT8px3phPPk2UEc1MtqeaXnL9coo243Mu7aENb1OsiDQKJ6TCXKE7QqR6sj9I
16 | B9rI36aKIweG6nVPVlzn0LREdwKBgQDhBvBQ1BAtvq/DXHdurqBdXpXIdS/xWc4E
17 | GVsKsInhg3Tr1PUhjwpIUG02uyIdJzy+6K2UjAqQoo4B5D55hWL4tHx0S2mt38g4
18 | LCAs6s8Gr0E9Gnuwij5Up8bag3rTtMmjk0pFDcJtAQFMQ0WiXTkkgklKYuavCFIK
19 | h9rO6R1cJwKBgQC2lXR/ZNkzQCCnrDtYnWMr1grWVuHsE4hbqm/BZC7n7IpVbJ9v
20 | fDKq/nI/Z8Ooyd+lTPMnAITy9sq5Nnvse+uGbT+SPrsfJwEO3lcgkf6hQBxTLggf
21 | YNol8BPMgb4t0FyabqMbdI5QnBZoy7mwanTAPajYRLZRgQA8YRixBO2iaQKBgFGz
22 | xj9ir7kcOg7RnN+H8dvUwsd0nQKhW6arWh3oeTdzFlmmCZa0q8QTx4OOsFUrcOfT
23 | 7Wo46oEXND5Fk9Vlc8jfJyzGUMl7reOPSeNlIePIcARygCRaHUV5YT7nbAo/4tJM
24 | YTPvSf9v1PvOlRLdjCjQUTH79MvqVndSWkSz6SATAoGBAM0RSRuSOI+/AhPUKBc8
25 | kknh5GF7fTAtAABwj5ruvqaNzTGwtJWyge9W+ZxuiCC+oFCMmslzOzvXVA/Uwmk0
26 | BnPR5eZZm8/LwGHr0Npk8D9VrCE5KmyhpBFczXxVNXZ/KBduZu//UFxPhWim/bzl
27 | 3pArPBZ0o9eeHjxbch5ct2uF
28 | -----END PRIVATE KEY-----
29 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncDataExchangeHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.http.nio;
28 |
29 | /**
30 | * Abstract asynchronous data exchange handler that acts as a data consumer
31 | * and a data producer.
32 | *
33 | * @since 5.0
34 | */
35 | public interface AsyncDataExchangeHandler extends AsyncDataConsumer, AsyncDataProducer {
36 |
37 | /**
38 | * Triggered to signal a failure in data processing.
39 | *
40 | * @param cause the cause of the failure.
41 | */
42 | void failed(Exception cause);
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/pool/ManagedConnPool.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.pool;
28 |
29 | import org.apache.hc.core5.io.ModalCloseable;
30 |
31 | /**
32 | * {@link ConnPool} that also implements {@link ConnPoolControl} and {@link AutoCloseable}.
33 | *
34 | * @param the route type that represents the opposite endpoint of a pooled
35 | * connection.
36 | * @param the type of pooled connections.
37 | * @since 4.2
38 | */
39 | public interface ManagedConnPool extends ConnPool, ConnPoolControl, ModalCloseable {
40 |
41 | }
42 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/impl/io/ResponseOutOfOrderException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.impl.io;
29 |
30 | import java.io.IOException;
31 |
32 | /**
33 | * Signals an early (out of order) response.
34 | */
35 | class ResponseOutOfOrderException extends IOException {
36 |
37 | /**
38 | * Required for serialization support.
39 | *
40 | * @see java.io.Serializable
41 | */
42 | private static final long serialVersionUID = 7802054516041674757L;
43 |
44 | public ResponseOutOfOrderException() {
45 | super();
46 | }
47 |
48 | }
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/StreamClosedException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http;
29 |
30 | import java.io.IOException;
31 |
32 | /**
33 | * Signals that data stream has already been closed.
34 | *
35 | * @since 5.0
36 | */
37 | public class StreamClosedException extends IOException {
38 |
39 | private static final long serialVersionUID = 1L;
40 |
41 | public StreamClosedException() {
42 | super("Stream already closed");
43 | }
44 |
45 | public StreamClosedException(final String message) {
46 | super(message);
47 | }
48 |
49 | }
50 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/frame/FrameConsts.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.http2.frame;
28 |
29 | /**
30 | * Values used by HTTP/2 protocol.
31 | *
32 | * @since 5.0
33 | */
34 | public final class FrameConsts {
35 |
36 | private FrameConsts() {
37 | // Do not allow utility class to be instantiated.
38 | }
39 |
40 | public final static int HEAD_LEN = 9;
41 | public final static int MAX_PADDING = 255;
42 | public final static int MIN_FRAME_SIZE = 16384; // 2 ^ 14
43 | public final static int MAX_FRAME_SIZE = 16777215; // 2 ^ 24 - 1;
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/concurrent/Cancellable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.concurrent;
28 |
29 | /**
30 | * A {@code Cancellable} represents a process or an operation that can be
31 | * canceled.
32 | *
33 | * @since 4.2
34 | */
35 | public interface Cancellable {
36 |
37 | /**
38 | * Cancels the ongoing operation or process.
39 | *
40 | * @return {@code true} if the operation or process has been cancelled as a result of
41 | * this method call or {@code false} if it has already been cancelled or not started.
42 | */
43 | boolean cancel();
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/nio/ssl/TlsUpgradeCapable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.nio.ssl;
29 |
30 | import org.apache.hc.core5.annotation.Internal;
31 | import org.apache.hc.core5.concurrent.FutureCallback;
32 | import org.apache.hc.core5.net.NamedEndpoint;
33 | import org.apache.hc.core5.reactor.ProtocolIOSession;
34 |
35 | /**
36 | * Capability to upgrade to TLS.
37 | *
38 | * @since 5.2
39 | */
40 | @Internal
41 | public interface TlsUpgradeCapable {
42 |
43 | void tlsUpgrade(NamedEndpoint endpoint, final FutureCallback callback);
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/net/NamedEndpoint.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.net;
29 |
30 | /**
31 | * Endpoint identified by name (usually a fully qualified domain name) and port.
32 | *
33 | * @since 5.0
34 | */
35 | public interface NamedEndpoint {
36 |
37 | /**
38 | * Returns name (IP or DNS name).
39 | *
40 | * @return the host name (IP or DNS name)
41 | */
42 | String getHostName();
43 |
44 | /**
45 | * Returns the port.
46 | *
47 | * @return the host port, or {@code -1} if not set
48 | */
49 | int getPort();
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/pool/DisposalCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.pool;
28 |
29 | import org.apache.hc.core5.annotation.Internal;
30 | import org.apache.hc.core5.io.CloseMode;
31 | import org.apache.hc.core5.io.ModalCloseable;
32 |
33 | /**
34 | * Represents a customizable disposal strategy for {@link ModalCloseable} instances.
35 | *
36 | * @param process or connection type.
37 | *
38 | * @since 5.0
39 | */
40 | @Internal
41 | public interface DisposalCallback {
42 |
43 | void execute(final T closeable, CloseMode closeMode);
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/annotation/Experimental.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.annotation;
28 |
29 | import java.lang.annotation.Documented;
30 | import java.lang.annotation.ElementType;
31 | import java.lang.annotation.Retention;
32 | import java.lang.annotation.RetentionPolicy;
33 | import java.lang.annotation.Target;
34 |
35 | /**
36 | * The field or method to which this annotation is applied is marked as experimental.
37 | */
38 | @Documented
39 | @Target({ElementType.METHOD, ElementType.TYPE, ElementType.FIELD})
40 | @Retention(RetentionPolicy.CLASS)
41 | public @interface Experimental {
42 | }
43 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/HeaderElements.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http;
29 |
30 | /**
31 | * Constants for frequently used Header elements.
32 | *
33 | * @since 5.0
34 | */
35 | public final class HeaderElements {
36 |
37 | private HeaderElements() {
38 | }
39 |
40 | public static final String CHUNKED_ENCODING = "chunked";
41 | public static final String CLOSE = "close";
42 | public static final String KEEP_ALIVE = "keep-alive";
43 | public static final String UPGRADE = "upgrade";
44 | public static final String CONTINUE = "100-continue";
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/httpcore5-h2/src/main/java/org/apache/hc/core5/http2/hpack/HPackException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.http2.hpack;
28 |
29 | import org.apache.hc.core5.http.HttpException;
30 |
31 | /**
32 | * Signals HPACK protocol violation.
33 | *
34 | * @since 5.0
35 | */
36 | public class HPackException extends HttpException {
37 |
38 | private static final long serialVersionUID = 1L;
39 |
40 | public HPackException(final String message) {
41 | super(message);
42 | }
43 |
44 | public HPackException(final String message, final Exception cause) {
45 | super(message, cause);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/httpcore5-testing/src/test/resources/docker/httpd/httpd-ssl.conf:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one or more
2 | # contributor license agreements. See the NOTICE file distributed with
3 | # this work for additional information regarding copyright ownership.
4 | # The ASF licenses this file to You under the Apache License, Version 2.0
5 | # (the "License"); you may not use this file except in compliance with
6 | # the License. You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | Listen 443
18 |
19 | SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
20 | SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
21 |
22 | SSLHonorCipherOrder on
23 |
24 | SSLProtocol all -SSLv3
25 | SSLProxyProtocol all -SSLv3
26 |
27 | SSLPassPhraseDialog builtin
28 |
29 | SSLSessionCacheTimeout 300
30 |
31 |
32 | ServerName localhost:443
33 | Protocols h2 http/1.1
34 |
35 | SSLEngine on
36 | SSLCertificateFile "/usr/local/apache2/conf/server-cert.pem"
37 | SSLCertificateKeyFile "/usr/local/apache2/conf/server-key.pem"
38 | CustomLog /proc/self/fd/1 \
39 | "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
40 |
41 |
42 | LogLevel http2:info
43 | H2Push on
44 | H2EarlyHints on
45 |
46 |
47 | H2PushResource /aaa
48 | H2PushResource /bbb
49 | H2PushResource /ccc
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/NameValuePair.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http;
29 |
30 | /**
31 | * A name-value pair parameter used as an element of HTTP messages.
32 | *
33 | * @since 4.0
34 | */
35 | public interface NameValuePair {
36 |
37 | /**
38 | * Gets the name of this pair.
39 | *
40 | * @return the name of this pair, never {@code null}.
41 | */
42 | String getName();
43 |
44 | /**
45 | * Gets the value of this pair.
46 | *
47 | * @return the value of this pair, may be {@code null}.
48 | */
49 | String getValue();
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/reactor/IOWorkerStats.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.reactor;
29 |
30 | import org.apache.hc.core5.annotation.Internal;
31 |
32 | /**
33 | * Internal I/O dispatch stats that can be used by {@link IOWorkerSelector}
34 | * to select the best suited worker to get new I/O channels.
35 | *
36 | * @since 5.4
37 | */
38 | @Internal
39 | public interface IOWorkerStats {
40 |
41 | // Relatively expensive
42 | int totalChannelCount();
43 |
44 | // Relatively expensive
45 | int pendingChannelCount();
46 |
47 | // Cheap
48 | long lastSelectMilli();
49 |
50 | }
51 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/io/HttpResponseInformationCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.io;
29 |
30 | import org.apache.hc.core5.http.HttpConnection;
31 | import org.apache.hc.core5.http.HttpException;
32 | import org.apache.hc.core5.http.HttpResponse;
33 | import org.apache.hc.core5.http.protocol.HttpContext;
34 |
35 | /**
36 | * Informational (1xx) HTTP response callback.
37 | *
38 | * @since 5.0
39 | */
40 | public interface HttpResponseInformationCallback {
41 |
42 | void execute(HttpResponse response, HttpConnection connection, HttpContext context) throws HttpException;
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/pool/PoolConcurrencyPolicy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.pool;
28 |
29 | /**
30 | * Enumeration of pool concurrency policies
31 | *
32 | * @since 5.0
33 | */
34 | public enum PoolConcurrencyPolicy {
35 |
36 | /**
37 | * Higher concurrency but with lax connection max limit guarantees.
38 | */
39 | LAX,
40 |
41 | /**
42 | * Strict connection max limit guarantees.
43 | */
44 | STRICT,
45 | /**
46 | * Lock-free, route-segmented pool: avoids blocking leases during slow connection disposal.
47 | * @since 5.4
48 | */
49 | OFFLOCK
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/pool/ConnPoolListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.pool;
28 |
29 | import org.apache.hc.core5.annotation.Contract;
30 | import org.apache.hc.core5.annotation.ThreadingBehavior;
31 |
32 | /**
33 | * Connection pool event listener.
34 | *
35 | * @param the route type that represents the opposite endpoint of a pooled connection.
36 | * @since 5.0
37 | */
38 | @Contract(threading = ThreadingBehavior.STATELESS)
39 | public interface ConnPoolListener {
40 |
41 | void onLease(T route, ConnPoolStats connPoolStats);
42 |
43 | void onRelease(T route, ConnPoolStats connPoolStats);
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/httpcore5-testing/src/main/java/org/apache/hc/core5/testing/classic/LoggingSupport.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.testing.classic;
28 |
29 | import org.apache.hc.core5.util.Identifiable;
30 |
31 | public final class LoggingSupport {
32 |
33 | public static String getId(final Object object) {
34 | if (object == null) {
35 | return null;
36 | }
37 | if (object instanceof Identifiable) {
38 | return ((Identifiable) object).getId();
39 | } else {
40 | return object.getClass().getSimpleName() + "-" + Integer.toHexString(System.identityHashCode(object));
41 | }
42 | }
43 |
44 | }
45 |
--------------------------------------------------------------------------------
/httpcore5/src/test/java/org/apache/hc/core5/http/config/TestRegistry.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.http.config;
28 |
29 | import org.junit.jupiter.api.Assertions;
30 | import org.junit.jupiter.api.Test;
31 |
32 | class TestRegistry {
33 |
34 | @Test
35 | void testCompleted() {
36 | final Registry reg = RegistryBuilder.create().register("Stuff", "Stuff").build();
37 | Assertions.assertEquals("Stuff", reg.lookup("Stuff"));
38 | Assertions.assertEquals("Stuff", reg.lookup("stuff"));
39 | Assertions.assertNull(reg.lookup("miss"));
40 | Assertions.assertNull(reg.lookup(null));
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/message/ParserCursor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 |
28 | package org.apache.hc.core5.http.message;
29 |
30 | import org.apache.hc.core5.util.Tokenizer;
31 |
32 | /**
33 | * This class represents a context of a parsing operation:
34 | *
35 | *
the current position the parsing operation is expected to start at
36 | *
the bounds limiting the scope of the parsing operation
37 | *
38 | *
39 | * @since 4.0
40 | */
41 | public class ParserCursor extends Tokenizer.Cursor {
42 |
43 | public ParserCursor(final int lowerBound, final int upperBound) {
44 | super(lowerBound, upperBound);
45 | }
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/test-CA/ca-key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN ENCRYPTED PRIVATE KEY-----
2 | MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIq0bLh96mWv4CAggA
3 | MBQGCCqGSIb3DQMHBAimZqUiELx13QSCBMgaLWrGFqveIzwQUsebS6FBdVq0lodz
4 | Vlekje8ycFDYSd21V9jPMwrSupZceeBQjCrpyLZ3oPkR+MvObmznev8XYcJzVCkF
5 | E9ApAaHZe248wWcu1/D7auHNG3GyZfvYS0c//Rs2OzMZfsUvX93RVullCRREvCYS
6 | qXhaO3ywFocndKRpSnkOBs2SRa0yc9POl4n4dwyKhsJUaMSmhPbJr9UBvCbXHZIA
7 | gLcSWzVon3EtZCSubMp9eo90G5MzIXEyPBTcIHwpyqRWTkaTUTq4R0c4/RTX+l7K
8 | OZuRIEeBEW6z009fSagymN/KEH3gUkg5pG6i1YWF63OVKTMGn+yQGWwYXwTyEGi5
9 | HZpD98wh3ycucmL93XLk+yYXQcTp1i+u4GaXNWGREQvNW6onCGeg6WWj1PrIsqoi
10 | TZ2pgQUJWPR1K3037hY0o9sakAkyYSyTPVvHOUcbf3+GhqGS1FsSNOxKRNpYm/3v
11 | Gf0SUN8BavPliK9NSU5JAbprr/hoL5o72dCX9DiOgwfW3HyD/gLh7sVyVBdAzTnE
12 | XFaYFnrb5QnqHbgWvaLbJUT5K7MW3OFLVConydYtYdaUl5z49OflhgnvYOPgTSUr
13 | k9c7exQjedAduPd8dXODh9l2g+QEXJoT+YYFEYHkQlsZgH1hCLXD1TmAeI4LMklb
14 | vPaGE8Ouj1pfbejdTNsqLfW0IiR/jZzEjRgqrueMf2VUjtqTZyPayc2rU4kOoKhv
15 | JzQ0wOFhgRztWJy2voRe+iYss3ToqZ7qLpjBfCTsxCJqbuaGeJWWSnOlDpSysgr+
16 | q4BvCzDcvf/0mKD2cQuJx/kynQMCcWB/VegRsQ24Y+3T7IU1w8ccmRfSZ93AwkAh
17 | MKJzKaVhD/gn9vUG/we18p7RMIc9pk1o2Z2Ru3mKjkO3QYRP6Y7yk0ah2JKrHIPf
18 | LWfPuHmtzHQXkY3RbVvxvwD/+qHm8ogXq52w8cpGhY5UwAEHrLLwypdBHccrAJjo
19 | bE13M/MrtTry/k8OMRqhhRzHUXBq6mLaWffCaP2SAVfJEez2iASvGJFvgy3bSkWY
20 | rwWMSfZKDkauwDMW5gpFrpeuqgD64LO72sN01riVDpaEyNODRCEEBGce+O+91R9K
21 | TLVgRYFsxClyZy1nynD66gkTepEm1yOgcdqV3651Os+TGm39jGYHy1k9mPz8ypqf
22 | 8n8uw4nV3SbIwfpy4Z8onHixfc/Fugm7yQHW4dSuCpahyIJHom6Cq7SZfPuo9e3t
23 | 8tqaxvK4U/dAXoimvN1eakH2FoVFIj3mk7OAKBgmDINH9GlzXPwRsTfiJSP4Xaod
24 | ouWIQLLeXQuuOc5VJd1Xex75o8ciSOomAS0uR4Fvk/2NkAm0EMddjZnuWLQaXPry
25 | JiUIgSx3w3yRq9RSQOxDRQpp2nP2roX7cyeGPzTmeujikExGTa3YBxuAShDLx5pt
26 | fpi0ol8H8ohDU4eV9pv96KRBG9e8sQf1zpGjeYLTFiN35IQxYJx3HTXp9/oFWkmA
27 | OdCEwggIKJ/RtgkWOWogTilQVA41p4XZr661fxoSE86sHXkZKn8IGnAKLFT46nWM
28 | IYVDalYUiSNZr+KbzmLIV3LmYE3mlqGI4vDvQtd9zQk/uatYBc2DetuTWPZHCEKS
29 | 3Nk=
30 | -----END ENCRYPTED PRIVATE KEY-----
31 |
--------------------------------------------------------------------------------
/httpcore5/src/main/java/org/apache/hc/core5/http/HttpStreamResetException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.http;
28 |
29 | import java.io.IOException;
30 |
31 | /**
32 | * Signals HTTP protocol error that renders the actual HTTP data stream unreliable.
33 | *
34 | * @since 5.0
35 | */
36 | public class HttpStreamResetException extends IOException {
37 |
38 | private static final long serialVersionUID = 1L;
39 |
40 | public HttpStreamResetException(final String message) {
41 | super(message);
42 | }
43 |
44 | public HttpStreamResetException(final String message, final Throwable cause) {
45 | super(message, cause);
46 | }
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/httpcore5/src/test/java/org/apache/hc/core5/concurrent/TestCompletedFuture.java:
--------------------------------------------------------------------------------
1 | /*
2 | * ====================================================================
3 | * Licensed to the Apache Software Foundation (ASF) under one
4 | * or more contributor license agreements. See the NOTICE file
5 | * distributed with this work for additional information
6 | * regarding copyright ownership. The ASF licenses this file
7 | * to you under the Apache License, Version 2.0 (the
8 | * "License"); you may not use this file except in compliance
9 | * with the License. You may obtain a copy of the License at
10 | *
11 | * http://www.apache.org/licenses/LICENSE-2.0
12 | *
13 | * Unless required by applicable law or agreed to in writing,
14 | * software distributed under the License is distributed on an
15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 | * KIND, either express or implied. See the License for the
17 | * specific language governing permissions and limitations
18 | * under the License.
19 | * ====================================================================
20 | *
21 | * This software consists of voluntary contributions made by many
22 | * individuals on behalf of the Apache Software Foundation. For more
23 | * information on the Apache Software Foundation, please see
24 | * .
25 | *
26 | */
27 | package org.apache.hc.core5.concurrent;
28 |
29 | import org.junit.jupiter.api.Assertions;
30 | import org.junit.jupiter.api.Test;
31 |
32 | class TestCompletedFuture {
33 |
34 | @Test
35 | void testCompleted() {
36 | final Object result = new Object();
37 | final CompletedFuture