Skip to content

Commit

Permalink
Moving RedirectPolicy from Common to CallingServer
Browse files Browse the repository at this point in the history
  • Loading branch information
cochi2 committed Jul 27, 2021
1 parent 8e96741 commit ec4bbe4
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -608,5 +608,5 @@ the main ServiceBusClientBuilder. -->

<!-- Checkstyle suppressions to keep HttpPipelinePolicy in implementation folder. -->
<suppress checks="com.azure.tools.checkstyle.checks.HttpPipelinePolicyCheck"
files="com.azure.communication.common.implementation.RedirectPolicy.java"/>
files="com.azure.communication.callingserver.implementation.RedirectPolicy.java"/>
</suppressions>
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Release History

## 1.0.0-beta.4 (unreleased)

## 1.0.0-beta.3 (2021-07-26)
### Features Added
- Added RedirectPolicy as a new HttpPolicy to redirect requests based on the HttpResponse.

## 1.0.0-beta.2 (2021-06-25)
Expand Down
23 changes: 23 additions & 0 deletions sdk/communication/azure-communication-callingserver/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,27 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>is.jdk.11</id>
<activation>
<jdk>[9,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
--add-opens com.azure.communication.callingserver/com.azure.communication.callingserver.implementation=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import com.azure.communication.callingserver.implementation.AzureCommunicationCallingServerServiceImpl;
import com.azure.communication.callingserver.implementation.AzureCommunicationCallingServerServiceImplBuilder;
import com.azure.communication.common.implementation.RedirectPolicy;
import com.azure.communication.callingserver.implementation.RedirectPolicy;
import com.azure.communication.common.implementation.CommunicationConnectionString;
import com.azure.communication.common.implementation.HmacAuthenticationPolicy;
import com.azure.core.annotation.ServiceClientBuilder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.communication.common.implementation;
package com.azure.communication.callingserver.implementation;

import com.azure.core.http.HttpPipelineCallContext;
import com.azure.core.http.HttpPipelineNextPolicy;
Expand All @@ -14,8 +14,8 @@
import java.util.Set;

/**
* HttpPipelinePolicy to redirect requests when 302 message is received to the new location marked by the
* Location header.
* HttpPipelinePolicy to redirect requests when a redirect response (Http codes 301 or 302) is received to the
* new location marked by the Location header.
*/
public final class RedirectPolicy implements HttpPipelinePolicy {
private static final int MAX_REDIRECTS = 10;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.communication.common.implementation;
package com.azure.communication.callingserver.implementation;

import com.azure.core.http.HttpClient;
import com.azure.core.http.HttpMethod;
Expand Down
2 changes: 1 addition & 1 deletion sdk/communication/azure-communication-common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ Check out other client libraries for Azure communication service
[cla]: https://cla.microsoft.com
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
[coc_contact]: mailto:[email protected]
[coc_contact]: mailto:[email protected]
35 changes: 0 additions & 35 deletions sdk/communication/azure-communication-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,40 +84,5 @@
<version>3.4.8</version> <!-- {x-version-update;io.projectreactor:reactor-test;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.9.0</version> <!-- {x-version-update;org.mockito:mockito-core;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version> <!-- {x-version-update;org.hamcrest:hamcrest-all;external_dependency} -->
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>java-lts</id>
<activation>
<jdk>[11,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
<configuration>
<argLine>
--add-opens com.azure.communication.common/com.azure.communication.common.implementation=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

0 comments on commit ec4bbe4

Please sign in to comment.