Skip to content

add http-reactor-netty #45112

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* appended at the end of the same {@link HttpHeader} with commas separating them.
*/
@Metadata(properties = MetadataProperties.FLUENT)
public final class HttpHeader {
public class HttpHeader {

private final HttpHeaderName name;

Expand Down
3 changes: 3 additions & 0 deletions sdk/clientcore/http-reactor-netty/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Release History

## 1.0.0-beta.1 (Unreleased)
47 changes: 47 additions & 0 deletions sdk/clientcore/http-reactor-netty/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Client Core OkHttp HTTP plugin library for Java

Client Core Reactor Netty HTTP client is a plugin for the `io.clientcore.core` HTTP client API.

## Getting started

### Prerequisites

- A Java Development Kit (JDK), version 17 or later.

### Include the package

[//]: # ({x-version-update-start;io.clientcore:http-okhttp3;current})
```xml
<dependency>
<groupId>io.clientcore</groupId>
<artifactId>http-reactor-netty</artifactId>
<version>1.0.0-beta.1</version>
</dependency>
```
[//]: # ({x-version-update-end})

## Key concepts

## Examples


## Troubleshooting

If you encounter any bugs, please file issues via [GitHub Issues](https://github.com/Azure/azure-sdk-for-java/issues/new/choose)
or checkout [StackOverflow for Azure Java SDK](https://stackoverflow.com/questions/tagged/azure-java-sdk).

### Enabling Logging

Client Core libraries for Java provide a consistent logging story to help aid in troubleshooting application errors and
expedite their resolution. The logs produced will capture the flow of an application before reaching the terminal state
to help locate the root issue.

## Contributing

For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md).

1. Fork it
1. Create your feature branch (`git checkout -b my-new-feature`)
1. Commit your changes (`git commit -am 'Add some feature'`)
1. Push to the branch (`git push origin my-new-feature`)
1. Create new Pull Request
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suppressions PUBLIC "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN" "https://checkstyle.org/dtds/suppressions_1_2.dtd">
<!-- This file is generated by the /eng/scripts/linting_suppression_generator.py script. -->

<suppressions>
</suppressions>
250 changes: 250 additions & 0 deletions sdk/clientcore/http-reactor-netty/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
<!--
~ Copyright (c) Microsoft Corporation. All rights reserved.
~ Licensed under the MIT License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.clientcore</groupId>
<artifactId>clientcore-parent</artifactId>
<version>1.0.0-beta.1</version> <!-- {x-version-update;io.clientcore:clientcore-parent;current} -->
<relativePath>../../parents/clientcore-parent</relativePath>
</parent>

<groupId>io.clientcore</groupId>
<artifactId>http-reactor-netty</artifactId>
<packaging>jar</packaging>
<version>1.0.0-beta.1</version> <!-- {x-version-update;io.clientcore:http-reactor-netty;current} -->

<name>Java Netty HTTP Client Library</name>
<description>This package contains the Reactor Netty HTTP client plugin for io.clientcore.</description>
<url>https://github.com/Azure/azure-sdk-for-java</url>

<licenses>
<license>
<name>The MIT License (MIT)</name>
<url>http://opensource.org/licenses/MIT</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<url>https://github.com/Azure/azure-sdk-for-java</url>
<connection>scm:git:https://github.com/Azure/azure-sdk-for-java.git</connection>
<developerConnection>scm:git:https://github.com/Azure/azure-sdk-for-java.git</developerConnection>
</scm>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<legal><![CDATA[[INFO] Any downloads listed may be third party software. Microsoft grants you no rights for third party software.]]></legal>
<jacoco.min.linecoverage>0.80</jacoco.min.linecoverage>
<jacoco.min.branchcoverage>0.65</jacoco.min.branchcoverage>
<javaModulesSurefireArgLine>
--add-exports io.clientcore.core/io.clientcore.core.implementation.http=ALL-UNNAMED
--add-exports io.clientcore.core/io.clientcore.core.implementation.http.serializer=ALL-UNNAMED
--add-exports io.clientcore.core/io.clientcore.core.implementation.util=ALL-UNNAMED

--add-opens io.clientcore.http.reactor.netty/io.clientcore.http.reactor.netty=ALL-UNNAMED
--add-opens io.clientcore.http.reactor.netty/io.clientcore.http.reactor.netty.implementation=ALL-UNNAMED
</javaModulesSurefireArgLine>
<boring-ssl-classifier></boring-ssl-classifier>

<!-- Enables fail on deprecated API usage. -->
<compiler.failondeprecatedstatus/>

<javadoc.excludePackageNames>
io.clientcore.core.annotation,io.clientcore.core.credential,io.clientcore.core.http,io.clientcore.core.http.annotation,io.clientcore.core.http.client,
io.clientcore.core.http.exception,io.clientcore.core.http.models,io.clientcore.core.http.pipeline,io.clientcore.core.implementation,
io.clientcore.core.implementation*,io.clientcore.core.models,io.clientcore.core.util,io.clientcore.core.util*
</javadoc.excludePackageNames>
</properties>

<dependencies>
<dependency>
<groupId>io.clientcore</groupId>
<artifactId>core</artifactId>
<version>1.0.0-beta.9</version> <!-- {x-version-update;io.clientcore:core;current} -->
</dependency>


<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.1.118.Final</version> <!-- {x-version-update;io.netty:netty-handler;external_dependency} -->
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler-proxy</artifactId>
<version>4.1.118.Final</version> <!-- {x-version-update;io.netty:netty-handler-proxy;external_dependency} -->
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
<version>4.1.118.Final</version> <!-- {x-version-update;io.netty:netty-buffer;external_dependency} -->
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
<version>4.1.118.Final</version> <!-- {x-version-update;io.netty:netty-codec;external_dependency} -->
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http</artifactId>
<version>4.1.118.Final</version> <!-- {x-version-update;io.netty:netty-codec-http;external_dependency} -->
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http2</artifactId>
<version>4.1.118.Final</version> <!-- {x-version-update;io.netty:netty-codec-http2;external_dependency} -->
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-unix-common</artifactId>
<version>4.1.118.Final</version> <!-- {x-version-update;io.netty:netty-transport-native-unix-common;external_dependency} -->
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>4.1.118.Final</version> <!-- {x-version-update;io.netty:netty-transport-native-epoll;external_dependency} -->
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>4.1.118.Final</version> <!-- {x-version-update;io.netty:netty-transport-native-kqueue;external_dependency} -->
<classifier>osx-x86_64</classifier>
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>2.0.70.Final</version> <!-- {x-version-update;io.netty:netty-tcnative-boringssl-static;external_dependency} -->
<classifier>${boring-ssl-classifier}</classifier>
</dependency>

<dependency>
<groupId>io.projectreactor.netty</groupId>
<artifactId>reactor-netty-http</artifactId>
<version>1.0.48</version> <!-- {x-version-update;io.projectreactor.netty:reactor-netty-http;external_dependency} -->
</dependency>

<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
<version>4.1.118.Final</version> <!-- {x-version-update;io.netty:netty-common;external_dependency} -->
</dependency>

<!-- Test dependencies on core, because we want to run tests inherited from this module using Reactor Netty -->
<dependency>
<groupId>io.clientcore</groupId>
<artifactId>core</artifactId>
<version>1.0.0-beta.9</version> <!-- {x-version-update;io.clientcore:core;current} -->
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.4.56.v20240826</version> <!-- {x-version-update;org.eclipse.jetty:jetty-server;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>9.4.56.v20240826</version> <!-- {x-version-update;org.eclipse.jetty:jetty-servlet;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.11.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-api;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.11.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-engine;external_dependency} -->
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.11.2</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter-params;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version><!-- {x-version-update;org.mockito:mockito-core;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.conscrypt</groupId>
<artifactId>conscrypt-openjdk-uber</artifactId>
<version>2.5.2</version> <!-- {x-version-update;org.conscrypt:conscrypt-openjdk-uber;external_dependency} -->
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} -->
<configuration>
<rules>
<bannedDependencies>
<includes>
</includes>
</bannedDependencies>
</rules>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>native-linux</id>
<activation>
<property>
<name>native-linux</name>
</property>
</activation>

<properties>
<boring-ssl-classifier>linux-x86_64</boring-ssl-classifier>
</properties>
</profile>

<profile>
<id>native-macos</id>
<activation>
<property>
<name>native-macos</name>
</property>
</activation>

<properties>
<boring-ssl-classifier>osx-x86_64</boring-ssl-classifier>
</properties>
</profile>

<profile>
<id>native-windows</id>
<activation>
<property>
<name>native-windows</name>
</property>
</activation>

<properties>
<boring-ssl-classifier>windows-x86_64</boring-ssl-classifier>
</properties>
</profile>
</profiles>
</project>
36 changes: 36 additions & 0 deletions sdk/clientcore/http-reactor-netty/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>

<FindBugsFilter xmlns="https://github.com/spotbugs/filter/3.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://github.com/spotbugs/filter/3.0.0 https://raw.githubusercontent.com/spotbugs/spotbugs/3.1.0/spotbugs/etc/findbugsfilter.xsd">
<Match>
<Bug pattern="BC_UNCONFIRMED_CAST_OF_RETURN_VALUE" />
<Or>
<Class name="io.clientcore.http.okhttp3.OkHttpHttpClient" />
<Class name="io.clientcore.http.okhttp3.implementation.OkHttpInputStreamRequestBody" />
</Or>
</Match>
<Match>
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
<Class name="io.clientcore.http.okhttp3.OkHttpHttpClientBuilderTests" />
</Match>
<Match>
<Bug pattern="NP_NONNULL_RETURN_VIOLATION" />
<Class name="io.clientcore.http.okhttp3.implementation.OkHttpFileRequestBodyTest$TestSink" />
</Match>
<Match>
<Bug pattern="NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE" />
<Class name="io.clientcore.http.okhttp3.OkHttpHttpClient" />
</Match>
<Match>
<Bug pattern="NP_NULL_PARAM_DEREF_ALL_TARGETS_DANGEROUS" />
<Class name="io.clientcore.http.okhttp3.OkHttpHttpClientBuilderTests" />
</Match>
<Match>
<Bug pattern="NP_NULL_PARAM_DEREF_NONVIRTUAL" />
<Class name="io.clientcore.http.okhttp3.OkHttpHttpClientBuilderTests" />
</Match>
<Match>
<Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR" />
<Class name="io.clientcore.http.okhttp3.DeadlockTests" />
</Match>
</FindBugsFilter>
Loading
Loading