Skip to content
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

Move autorest client to java sdk central repo #3174

Merged
merged 4,612 commits into from
Mar 25, 2019
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
4612 commits
Select commit Hold shift + click to select a range
70c635f
Fix type name comparison in credentials test
RikkiGibson Oct 30, 2017
057efef
Merge pull request #281 from RikkiGibson/MigratePom
RikkiGibson Oct 30, 2017
90e8d44
Make HTTP request mutable and add clone() method
RikkiGibson Oct 30, 2017
3c44704
Use assertSame/assertNotSame for identity comparison
RikkiGibson Oct 30, 2017
3df0ce5
Fix broken links and HTML in Javadocs
RikkiGibson Oct 30, 2017
08636bd
Add better error message when a polling strategy cannot be determined
Oct 30, 2017
2edb8c4
Remove unnecessary comments
RikkiGibson Oct 30, 2017
a8f6239
Merge pull request #283 from RikkiGibson/FixJavadocs
RikkiGibson Oct 30, 2017
401828c
Convert String to byte[] with UTF-8 encoding
RikkiGibson Oct 31, 2017
74b018c
Merge pull request #286 from RikkiGibson/UseUTF8Encoding
RikkiGibson Oct 31, 2017
2ba45c1
Merge pull request #282 from RikkiGibson/MutableHttpRequest
RikkiGibson Oct 31, 2017
98ffdb7
Merge pull request #284 from Azure/ImproveErrorMessage
RikkiGibson Oct 31, 2017
3d1393a
Verify a response's status code before creating a polling strategy
Oct 31, 2017
1e4f939
Rename addCustomPolicy to addRequestPolicy. Remove withMaxIdleConnect…
RikkiGibson Oct 31, 2017
56946cd
Fix bugs and docs
RikkiGibson Nov 1, 2017
8fcebf0
Fix checkstyle
RikkiGibson Nov 1, 2017
486f58c
Add status code checking to PollStrategy.updateFromAsync()
Nov 1, 2017
8d9f17a
Fix checkstyle
Nov 1, 2017
1428e5c
Merge pull request #291 from Azure/CheckStatusCodeBeforePollingStrategy
RikkiGibson Nov 1, 2017
1720394
Fix mentions of credentials in comments
RikkiGibson Nov 1, 2017
8b52cf8
Merge pull request #290 from RikkiGibson/RenameRestClientMethods
Nov 1, 2017
1394167
Add proxy support
RikkiGibson Nov 2, 2017
9d48071
Ignore proxy tests
RikkiGibson Nov 2, 2017
650a6ac
Add proxy authentication policy
RikkiGibson Nov 2, 2017
9b7cf6a
Add scheme to proxy authentication header value
RikkiGibson Nov 2, 2017
0a5611f
Fix checkstyle
RikkiGibson Nov 2, 2017
c502ff5
Add address information to IllegalArgumentException
RikkiGibson Nov 2, 2017
aed2f18
Add mention of proxy authentication in Builder.withProxy
RikkiGibson Nov 2, 2017
34f461b
Fixes from review feedback
RikkiGibson Nov 2, 2017
78f0f28
Rename URI in NettyAdapter to channelAddress
RikkiGibson Nov 2, 2017
ebd371b
Merge pull request #293 from RikkiGibson/Proxy
RikkiGibson Nov 2, 2017
8916cf4
Update to RxJava2 and fix build errors
RikkiGibson Nov 2, 2017
fe18ed2
Fix tests
RikkiGibson Nov 3, 2017
fa2f402
Update build scripts
RikkiGibson Nov 3, 2017
289bfca
Fix Android CI
RikkiGibson Nov 3, 2017
c689a0b
Fixes from feedback. Better RestProxy exception messages.
RikkiGibson Nov 3, 2017
60c447b
Fix gradle.build for Android
RikkiGibson Nov 3, 2017
e2f99af
Merge branch 'RxJava2' of github.com:RikkiGibson/autorest-clientrunti…
RikkiGibson Nov 3, 2017
00e7ef1
Fix handling of checked exceptions from serialization
RikkiGibson Nov 3, 2017
d5fbbfd
Merge pull request #295 from RikkiGibson/SerializationExceptions
RikkiGibson Nov 6, 2017
71ec0e2
Merge remote-tracking branch 'upstream/v2' into RxJava2
RikkiGibson Nov 7, 2017
5e5ee6b
Add required parameters to Builder constructor. Add default RestClient.
RikkiGibson Nov 7, 2017
d416595
Tweak docs and use AzureRestClient in AzureServiceClient
RikkiGibson Nov 7, 2017
96fea38
Add back deprecated, parameterless builder constructor
RikkiGibson Nov 7, 2017
b1b5996
Remove unused serializer adapters in tests
RikkiGibson Nov 7, 2017
f1d8c0c
Merge pull request #296 from RikkiGibson/RestClientParameters
RikkiGibson Nov 7, 2017
8a773eb
Replace RestClient with HttpPipeline (#302)
Nov 21, 2017
e63b88b
Merge branch 'v2' into RxJava2
RikkiGibson Nov 27, 2017
efa0049
Add UrlBuilder.parse() (#303)
Nov 28, 2017
bb0fe5b
Add ProtocolPolicy and tests (#305)
Nov 28, 2017
fe0390f
Add health check to channel pool
jianghaolu Nov 28, 2017
070390a
Add extra request policies to RestProxy's default pipeline (#307)
Nov 29, 2017
92b1fcd
Add InputStream support for HttpRequestBody (#308)
Nov 29, 2017
417a516
Create HttpPipeline.Builder from an existing HttpPipeline (#309)
Nov 29, 2017
947c6aa
Merge remote-tracking branch 'upstream/v2' into RxJava2
RikkiGibson Nov 29, 2017
034f348
Use io.reactivex for new RequestPolicies
RikkiGibson Nov 29, 2017
f429620
Use Maybe to deserialize response bodies
RikkiGibson Nov 30, 2017
dfa495d
Remove usages of Exceptions.propagate
RikkiGibson Nov 30, 2017
ba5e8a8
Add AzureEnvironment to AzureServiceClient and add AzureProxy.create(…
Dec 1, 2017
a69790d
Add HostPolicy (#311)
Dec 1, 2017
4c6fc39
Merge remote-tracking branch 'upstream/v2' into RxJava2
RikkiGibson Dec 2, 2017
56f228e
Add http scheme if no scheme is provided when creating a HttpRequest …
Dec 5, 2017
b57d845
Move LogLevel to LoggingPolicy, expand HttpPipeline.Logger and add si…
Dec 5, 2017
eb28d89
Add withRequestPolicies
RikkiGibson Dec 5, 2017
7fc95c1
Merge pull request #306 from jianghaolu/v2chhealth
RikkiGibson Dec 5, 2017
f9f781c
Merge pull request #315 from RikkiGibson/WithRequestPolicies
RikkiGibson Dec 5, 2017
a58b7de
Merge remote-tracking branch 'upstream/v2' into RxJava2
RikkiGibson Dec 5, 2017
482df1b
Add UrlTokenizer and make UrlBuilder use it (#316)
Dec 6, 2017
709ebaa
Fixes and coverage for exception serialization
RikkiGibson Dec 6, 2017
7cd94ea
Remove unused imports
RikkiGibson Dec 6, 2017
9043b2c
Merge remote-tracking branch 'upstream/v2' into RxJava2
RikkiGibson Dec 6, 2017
fb890cc
Allow full URLs as value for PathParam (#317)
Dec 6, 2017
f19226e
Merge branch 'v2' of github.com:Azure/autorest-clientruntime-for-java…
RikkiGibson Dec 6, 2017
f2ce05b
Merge pull request #297 from Azure/RxJava2
RikkiGibson Dec 6, 2017
d6cec5b
Begin experimenting with Flowable response content
RikkiGibson Dec 6, 2017
5b8636c
Implement HttpContentFlowable
RikkiGibson Dec 6, 2017
a46ec90
Fix checkstyle
RikkiGibson Dec 6, 2017
0965b1c
Fix build errors
RikkiGibson Dec 7, 2017
95bbef4
Add missing Test attribute
RikkiGibson Dec 7, 2017
caa907b
Some error handling and other tweaks
RikkiGibson Dec 7, 2017
20dbf0a
Update Netty version. Stress testing. Fix test build errors.
RikkiGibson Dec 7, 2017
9d55342
Add MD5 verification to downloads test
RikkiGibson Dec 8, 2017
c236aad
Test cancellation
RikkiGibson Dec 8, 2017
25570a8
Test small file uploads
RikkiGibson Dec 8, 2017
f5ea287
Simplify download test
RikkiGibson Dec 8, 2017
490d023
Merge pull request #318 from RikkiGibson/Flowable
RikkiGibson Dec 8, 2017
8ab8eed
Recent requests from Rikki and Josh (#319)
Dec 8, 2017
1806ac5
Hide HttpPipeline.Logger inside RequestPolicy.Options (#320)
Dec 11, 2017
07fc86f
Add AsyncInputStream and FlowableFileStream
RikkiGibson Dec 12, 2017
14705e4
Extract all inner classes to their own files (#321)
Dec 12, 2017
8af3c20
Fix checkstyle
RikkiGibson Dec 12, 2017
97c1ccf
Add Flowable content to HttpRequestBody interface
RikkiGibson Dec 12, 2017
8a12346
Remove LoggingPolicy from RestProxyTests
RikkiGibson Dec 12, 2017
d78f9c3
Merge branch 'v2' of github.com:Azure/autorest-clientruntime-for-java…
RikkiGibson Dec 12, 2017
e86718a
Changes from feedback, bug fixes, additional testing
RikkiGibson Dec 13, 2017
f7f4ecf
Fix bug in test
RikkiGibson Dec 13, 2017
6f9fa81
Add parallel upload test
RikkiGibson Dec 13, 2017
79f0bfa
Remove FlowableFileStream. Backpressure file reads. More stress testing.
RikkiGibson Dec 13, 2017
913fa0c
Fix path replacement bug reported by Storage team (#323)
Dec 13, 2017
16df4a8
Tweak concurrency in tests
RikkiGibson Dec 14, 2017
f23b655
Add timeouts and central cleanup
RikkiGibson Dec 14, 2017
4582181
Fix hanging issue and cleanup
RikkiGibson Dec 14, 2017
3cfc5fe
Bring back FileRequestBody
RikkiGibson Dec 14, 2017
f7dc606
Merge branch 'v2' of github.com:Azure/autorest-clientruntime-for-java…
RikkiGibson Dec 14, 2017
ef928af
Fix file over-reading bug
RikkiGibson Dec 14, 2017
04c1e34
More fixes
RikkiGibson Dec 14, 2017
5c4fafe
Fix typo in doc
RikkiGibson Dec 15, 2017
658cd96
Don't overwrite a UrlBuilder path with a slash (#326)
Dec 15, 2017
8e3103d
Add upload test which writes files to disk upfront
RikkiGibson Dec 15, 2017
ca5bfaa
Merge branch 'AsyncRequestBody' of github.com:RikkiGibson/autorest-cl…
RikkiGibson Dec 15, 2017
b103fc9
Add Throttling policy
RikkiGibson Dec 16, 2017
8d987bb
Add isReplayable to AsyncInputStream
RikkiGibson Dec 16, 2017
70efbb4
Add parallel download test
RikkiGibson Dec 16, 2017
19239c1
Add download time taken logging
RikkiGibson Dec 16, 2017
c368604
Merge pull request #322 from RikkiGibson/AsyncRequestBody
RikkiGibson Dec 16, 2017
7784c59
Support AsyncInputStream return type
RikkiGibson Dec 21, 2017
75c0c45
Set Content-Length: 0 when body is null
RikkiGibson Dec 21, 2017
7c4e707
Merge pull request #328 from RikkiGibson/ReturnAsyncInputStream
RikkiGibson Dec 21, 2017
bbed1a9
Add AsyncInputStream.create(byte[])
RikkiGibson Dec 21, 2017
f849333
Merge pull request #329 from RikkiGibson/AsyncStreamFromBytes
RikkiGibson Dec 21, 2017
14b6280
Reduce duplication when sending request content
RikkiGibson Dec 22, 2017
3ff5dc8
Single<HttpResponse> closes channel if disposed before emitting
RikkiGibson Dec 22, 2017
44be63a
Release channel back to pool after closing
RikkiGibson Dec 22, 2017
6101f5c
Helpers for cancellation and error emit
RikkiGibson Dec 22, 2017
ec1d82e
Merge pull request #331 from RikkiGibson/Cancellation
RikkiGibson Dec 22, 2017
3c7587e
Add a RestProxy.create() overload that takes a ServiceClient paramete…
Dec 22, 2017
d402e1a
Remove Charsets.defaultCharset(). Update Jackson.
RikkiGibson Dec 29, 2017
430580b
Merge pull request #335 from RikkiGibson/Charsets
RikkiGibson Dec 29, 2017
91dc54e
Revert Jackson version to 2.8.11 and add JacksonSerializer tests (#336)
Jan 2, 2018
56e004f
Thread safety, native transports, and async file I/O (#337)
RikkiGibson Jan 3, 2018
0689b3e
Use HttpMethod instead of String (#342)
Jan 9, 2018
54ffc65
Use Single.error instead of throw Exceptions.propagate (#343)
RikkiGibson Jan 10, 2018
e8c95af
Use URL objects instead of Strings (#344)
Jan 10, 2018
b37e1e6
Remove check for null body parameter and get tests to pass (#346)
Jan 16, 2018
31d61d9
Tweaks for Azure Libraries for Java (#345)
RikkiGibson Jan 16, 2018
c2d49fa
Add flag to pretty print JSON HTTP bodies (#347)
RikkiGibson Jan 16, 2018
22dd100
Emit initial response when polling. Allow empty body to complete Prov…
RikkiGibson Jan 19, 2018
10934ce
Emit OperationStatus corresponding to Void response (#349)
RikkiGibson Jan 19, 2018
47aed34
Remove unused ListOperationCallback (#353)
RikkiGibson Jan 23, 2018
f3ff5bf
Use Flowable<byte[]> instead of AsyncInputStream. Drop File body type…
RikkiGibson Jan 24, 2018
47f7cd1
Perform response deserialization in HttpPipeline (#360)
RikkiGibson Feb 2, 2018
1fbbfe3
Use Flowable<ByteBuffer> instead of Flowable<byte[]> (#361)
RikkiGibson Feb 2, 2018
c090dad
Remove AsyncInputStream (#363)
RikkiGibson Feb 3, 2018
aff8cac
Wrap exceptions generated from deserialization and other minor tweaks…
RikkiGibson Feb 4, 2018
2ba4b0f
Add ByteBufferUtil and tests (#365)
Feb 5, 2018
7bff1c6
Add FlowableUtil.collectBytesInBuffer() method (#366)
Feb 5, 2018
b992a50
Add decoding policy to default pipelines (#367)
Feb 5, 2018
98cefba
addQueryParameter() -> setQueryParameter() (#368)
RikkiGibson Feb 6, 2018
c59c3a1
Add client-runtime-native module (#369)
RikkiGibson Feb 7, 2018
3a2ebdb
Update to Netty 4.1.21 and test read-only memory mapped file (#370)
RikkiGibson Feb 7, 2018
e74b137
Add support for x-ms-header-collection-prefix extension (#371)
Feb 7, 2018
fd8c8a2
Add runtime support for deserializing HeaderCollections (#376)
Feb 9, 2018
0c8b983
Fix javadoc error (#378)
RikkiGibson Feb 10, 2018
ab5a938
Always specify charset with new String(). Prefer StandardCharsets ove…
RikkiGibson Feb 13, 2018
7dd4975
Add shutdown() method to HttpClient.Factory (#380)
RikkiGibson Feb 21, 2018
0df9f06
Initial check in for resumable LRO.
alvadb Feb 22, 2018
5a6c2ee
checkstyle fix
alvadb Feb 22, 2018
8707b50
Checkstyle fixes.
alvadb Feb 22, 2018
ac0f358
Check style fixes.
alvadb Feb 22, 2018
f759638
Checkstyle updates.
alvadb Feb 22, 2018
9205a08
Checkstyle fixes.
alvadb Feb 22, 2018
be7995a
Another checkstyle fix.
abandy Feb 23, 2018
29b33eb
Merge pull request #387 from alvadb/v2
alvadb Feb 23, 2018
5871dbe
Fix Void response body connection leak (#384)
RikkiGibson Feb 23, 2018
08137b4
Fix spelling in PollStrategy Javadoc (#392)
RikkiGibson Feb 28, 2018
d9512b5
Add RestResponse subtypes and handling (#393)
RikkiGibson Mar 2, 2018
9125441
Various minor improvements (#396)
RikkiGibson Mar 6, 2018
e2171de
Update README.md and add convenience HttpPipelineBuilder methods (#398)
RikkiGibson Mar 7, 2018
5ee07f4
Fix reentrant safety in ResponseContentFlowable (#402)
RikkiGibson Mar 8, 2018
7462868
Update changelog for preview 1
RikkiGibson Mar 8, 2018
d972054
[maven-release-plugin] prepare release v2.0.0-beta1
RikkiGibson Mar 8, 2018
9b83b42
[maven-release-plugin] prepare for next development iteration
RikkiGibson Mar 8, 2018
1b5150d
Remove Joda dependency (#404)
Mar 9, 2018
2a83e2f
Merge branch 'v2' of github.com:Azure/autorest-clientruntime-for-java…
RikkiGibson Mar 10, 2018
c60a789
Add back apache commons for now (#416)
RikkiGibson Apr 5, 2018
b160687
Move groupId above parent groupId so publish tools can infer it (#418)
RikkiGibson Apr 6, 2018
58a17ec
v2 NettyClient flowable rework (#406)
davidmoten Apr 12, 2018
5359844
Netty client rework 2 (#420)
RikkiGibson Apr 12, 2018
6ca8a13
Move os-maven-plugin to client-runtime-native package. Update Netty a…
RikkiGibson Apr 13, 2018
303e566
Various minor improvements (#425)
RikkiGibson Apr 24, 2018
1a6797d
[maven-release-plugin] prepare release v2.0.0-beta2
RikkiGibson Apr 25, 2018
c8f24ad
[maven-release-plugin] prepare for next development iteration
RikkiGibson Apr 25, 2018
857b5c1
Update version number in README
RikkiGibson May 1, 2018
c8fcaac
Add os-maven-plugin example to README
RikkiGibson May 1, 2018
4743388
Update Netty to 4.1.25.Final (#429)
RikkiGibson May 21, 2018
40a9487
Add FlowableUtil.ensureLength (#430)
RikkiGibson Jun 12, 2018
a1e4708
[maven-release-plugin] prepare release v2.0.0-beta3
RikkiGibson Jun 26, 2018
39ada0a
[maven-release-plugin] prepare for next development iteration
RikkiGibson Jun 26, 2018
f89125b
Initial tweaks in hopes of fixing channel pipeline NRE bug (#456)
RikkiGibson Aug 1, 2018
b138dd9
Add request property to RestResponse (#457)
RikkiGibson Aug 1, 2018
24d7b6d
Support custom port for https proxy (#462)
RikkiGibson Aug 6, 2018
69faa8a
[maven-release-plugin] prepare release v2.0.0-beta4
RikkiGibson Aug 6, 2018
a042c9b
[maven-release-plugin] prepare for next development iteration
RikkiGibson Aug 6, 2018
62167c3
Add UnexpectedLengthException (#468)
RikkiGibson Aug 16, 2018
3dca98e
[maven-release-plugin] prepare release v2.0.0-beta5
RikkiGibson Aug 22, 2018
45df0d7
[maven-release-plugin] prepare for next development iteration
RikkiGibson Aug 22, 2018
426c5f5
Fix HTTPS proxying (#476)
RikkiGibson Aug 23, 2018
34fa182
Enable MSICrdentials in v2: Merging msi credentials for app-service a…
anuchandy Aug 23, 2018
057546c
Guava gone (#477)
jianghaolu Aug 23, 2018
fef3f0e
Adding beta annotation (#478)
anuchandy Aug 24, 2018
5443cdc
Add Context class, HttpRequest property, and RestProxy handling (#479)
RikkiGibson Aug 24, 2018
c27b25f
Implement our own URL escaper (#481)
jianghaolu Aug 29, 2018
96e040c
Add SkipParentValidation annotation from v1 (#484)
jianghaolu Aug 29, 2018
4aeecd9
[fixes #460] Fix request body logging (#485)
jianghaolu Aug 30, 2018
5fca66e
Remove Refresh token client and fix CLI login (#486)
jianghaolu Aug 31, 2018
b88ae31
ProvisioningStateStrategy should not poll if there is no provisioning…
anuchandy Aug 31, 2018
b9c0997
Remove channel writing state machine (#482)
RikkiGibson Sep 7, 2018
4c32e86
[maven-release-plugin] prepare release v2.0.0
RikkiGibson Sep 7, 2018
c1761b7
[maven-release-plugin] prepare for next development iteration
RikkiGibson Sep 7, 2018
00e4e47
Add versionConfig.csv
RikkiGibson Sep 7, 2018
fcf48ff
Support async adal authentication (#499)
jianghaolu Oct 5, 2018
0032bb5
Add delegated token credentials (#500)
jianghaolu Oct 9, 2018
b9ffe23
Fix environment for Netty behaviors (#501)
jianghaolu Oct 10, 2018
02976d7
Porting v1 runtime flattening serializer to v2 runtime & configuratin…
anuchandy Sep 19, 2018
a255ad4
Porting SkipParentValidation processing from v1 to v2
anuchandy Sep 19, 2018
089524f
Adding test for FlatteningSerializer
anuchandy Sep 20, 2018
0679596
honor location header for POST & DELETE
anuchandy Oct 4, 2018
874a956
Ignore android build
jianghaolu Oct 10, 2018
0e13372
Migrate flattening serializer test
jianghaolu Oct 10, 2018
7bb7731
Migrate additional properties from v1
jianghaolu Oct 11, 2018
66b70ae
Shared pool channel TTL support and fix to use available pool channel…
anuchandy Oct 16, 2018
d5246e3
[do not merge] Netty client error handling (#505)
jianghaolu Dec 5, 2018
30fb8a8
Replacing NettyAdapter with reactor-netty
anuchandy Jan 4, 2019
5bd2a25
Adding a Util type to azure-client-authentication module to hold comm…
anuchandy Jan 14, 2019
996c7b7
Renaming package v2 to v3
anuchandy Jan 25, 2019
7634db2
Up build tools version to v3 (#539)
jianghaolu Jan 31, 2019
34eb87a
Fixes in runtime v3 (#540)
jianghaolu Feb 6, 2019
0151048
V3 Netty ByteBuf, new pipeline and more (#545)
anuchandy Feb 15, 2019
5739b6f
Removing HttpClient Factory, some meaningful renames of types, method…
anuchandy Feb 16, 2019
5c4d932
Decouple HttpResponseDecoder from SwaggerMethodParser, Making Jackson…
anuchandy Feb 17, 2019
3480480
Httpbin update (check for https/http), default impl for HttpResponseD…
anuchandy Feb 20, 2019
10c4358
Types for http content and headers lazy deserialization and cleanup (…
anuchandy Feb 27, 2019
0596f39
bringing content-type back to public (need to decide what to do with …
anuchandy Feb 28, 2019
555ae15
Folding http configuration to HttpClient, Adding HttpResponse::bodyAs…
anuchandy Mar 1, 2019
0ddb139
Upgrading netty version to 4.1.33.Final from 4.1.28.Final (#568)
anuchandy Mar 5, 2019
307b1dd
Renames RestResponse to RestResponseBase, RestContentResponse to Rest…
anuchandy Mar 7, 2019
3eff2d4
removing custom logger API (#571)
anuchandy Mar 8, 2019
c81e682
Making HttpMethod native enum (#572)
anuchandy Mar 8, 2019
368e089
Making HttpClient interface (#576)
anuchandy Mar 12, 2019
d6f8f76
Making PercentEscaper UrlEscapers package private, Removing unused Ht…
anuchandy Mar 12, 2019
91bc32f
Defining better RestResponse type hierarchy (#579)
JonathanGiles Mar 12, 2019
71bc929
Adding HttpPipeline::ctr that takes list (#581)
anuchandy Mar 13, 2019
a3b64ac
Disabling a failing test and fixing a regression I introduced. (#582)
JonathanGiles Mar 13, 2019
8287c4e
Refactoring of the client-runtime module (#583)
JonathanGiles Mar 13, 2019
caa5840
Adapting to new package structure. (#586)
anuchandy Mar 14, 2019
16cad94
upgrading jackson version to 2.9.4 (#591)
anuchandy Mar 19, 2019
d81be12
Add 'common/' from commit '16cad94c3f51f9e5df196b7b5c175e91400930bc'
sima-zhu Mar 21, 2019
7b66b13
Merge branch 'master' of https://github.com/Azure/azure-sdk-for-java …
sima-zhu Mar 22, 2019
5d61ab9
ignore the readme issue
sima-zhu Mar 22, 2019
60304c1
Merge branch 'master' into moveRepo
sima-zhu Mar 22, 2019
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
31 changes: 31 additions & 0 deletions common/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file should be removed during clean-up.

*.class
target
gen

# Mobile Tools for Java (J2ME)
.mtj.tmp/
tmp

# Package Files #
*.jar
*.war
*.ear
*.MF
.gitrevision
.gradle

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# ide
.idea
*.iml
.DS_Store
**/temp/

#eclipse
.project
.classpath
.settings

17 changes: 17 additions & 0 deletions common/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
language: android
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed during clean-up.

android:
components:
- build-tools-23.0.1
- android-23
- platform-tools
- extra-android-support
- extra-google-m2repository
- extra-android-m2repository
sudo: false
env:
- TERM=dumb # Makes Gradle use plain console output
script:
- mvn clean install -B -Dstyle.color=always
- mvn checkstyle:check -B -Dstyle.color=always
# (ignore android build for now)
# - cd ./azure-android-client-authentication && ./gradlew check
15 changes: 15 additions & 0 deletions common/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
2.0.0-beta4 (2018-08-06)
- Added HttpRequest request() property to RestResponse
- Added isProxyHTTPS() property to HttpClientConfiguration

2.0.0-beta3 (2018-06-26)
- Added FlowableUtil.ensureLength() operator to better handle cases where the request body had an unexpected size

2.0.0-beta2 (2018-04-23)
- Major refinements to HTTP content streaming, in large part thanks to contributions by [David Moten](https://github.com/davidmoten).
- Removed Joda Time in favor of Java 8 DateTime classes
- NettyClient.Factory now accepts a Netty Bootstrap object allowing for more user configuration of channel attributes, such as the receive buffer size and low/high write watermarks. Currently, specifying an EventLoopGroup or `Class<? extends Channel>` is not supported.
- Various other minor improvements

2.0.0-beta1 (2018-03-08)
- First beta featuring Netty and RxJava 2.
21 changes: 21 additions & 0 deletions common/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be removed during clean-up.


Copyright (c) 2016 Microsoft Azure

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
124 changes: 124 additions & 0 deletions common/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
[![Build Status](https://travis-ci.org/Azure/autorest-clientruntime-for-java.svg?branch=v2)](https://travis-ci.org/Azure/autorest-clientruntime-for-java)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README.md files should go under the package folder during clean-up.


# AutoRest Client Runtimes for Java
The runtime libraries for [AutoRest](https://github.com/azure/autorest) generated Java clients.

## Usage

### Prerequisites

- JDK 1.8

### Download

```xml
<dependencies>
<!-- For generic, non-Azure Resource Management users -->
<dependency>
<groupId>com.microsoft.rest.v3</groupId>
<artifactId>client-runtime</artifactId>
<version>2.0.0-beta4</version>
</dependency>

<!-- For Azure Resource Management users -->
<dependency>
<groupId>com.microsoft.azure.v3</groupId>
<artifactId>azure-client-runtime</artifactId>
<version>2.0.0-beta4</version>
</dependency>

<dependency>
<groupId>com.microsoft.azure.v3</groupId>
<artifactId>azure-client-authentication</artifactId>
<version>2.0.0-beta4</version>
</dependency>

<!-- Below are optional high-performance native dependencies -->

<!-- Available on Windows/Mac/Linux x86_64 -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
<version>2.0.8.Final</version>
<classifier>${os.detected.classifier}</classifier>
</dependency>

<!-- Only available on Linux -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>4.1.23.Final</version>
<classifier>${os.detected.classifier}</classifier>
</dependency>

<!-- Only available on macOS/BSD -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>4.1.23.Final</version>
<classifier>${os.detected.classifier}</classifier>
</dependency>
</dependencies>

<!-- Allows automatic detection of OS for native modules -->
<build>
<extensions>
<extension>
<groupId>kr.motd.maven</groupId>
<artifactId>os-maven-plugin</artifactId>
<version>1.6.0</version>
</extension>
</extensions>
</build>
```

### Usage

Non-Azure generated clients will have a constructor that takes no arguments for simple scenarios, while Azure generated clients will require a `ServiceClientCredentials` argument at a minimum.

If you want to have more control over configuration, consider using HttpPipeline. This enables performing transformations on all HTTP messages sent by a client, similar to interceptors or filters in other HTTP clients.

You can build an HttpPipeline out of a sequence of RequestPolicyFactories. These policies will get applied in-order to outgoing requests, and then in reverse order for incoming responses. HttpPipelineBuilder includes convenience methods for adding several built-in RequestPolicyFactories, including policies for credentials, logging, response decoding (deserialization), cookies support, and several others.

```java
// For Java generator
HttpPipeline pipeline = new HttpPipelineBuilder()
.withHostPolicy("http://localhost")
.withDecodingPolicy()
.build();
AutoRestJavaClient client = new AutoRestJavaClientImpl(pipeline);

// For Azure.Java generator
HttpPipeline azurePipeline = new HttpPipelineBuilder()
.withCredentialsPolicy(AzureCliCredentials.create())
.withHttpLoggingPolicy(HttpLogDetailLevel.HEADERS)
.withDecodingPolicy()
.build();
FooServiceClient azureClient = new FooServiceClientImpl(azurePipeline);
```

## Components

### client-runtime
This is the generic runtime. Add this package as a dependency if you are using `Java` generator in AutoRest. This package depends on [Netty](https://github.com/netty/netty), [Jackson](http://wiki.fasterxml.com/JacksonHome), and [RxJava](https://github.com/ReactiveX/RxJava) for making and processing REST requests.

### azure-client-runtime
This is the runtime with Azure Resource Management customizations. Add this package as a dependency if you are using `--azure-arm` or `--azure-arm --fluent` generator flags in AutoRest.

This combination provides a set of Azure specific behaviors, including long running operations, special handling of HEAD operations, and paginated `list()` calls.

### azure-client-authentication (beta)
This package provides access to Active Directory authentication on JDK using OrgId or application ID / secret combinations. There are currently 3 types of authentication provided:

- Service principal authentication: `ApplicationTokenCredentials`
- Username / password login without multi-factor auth: `UserTokenCredentials`
- Use the credentials logged in [Azure CLI](https://github.com/azure/azure-cli): `AzureCliCredentials`

### azure-android-client-authentication (beta)
This package provides access to Active Directory authentication on Android. You can login with Microsoft accounts, OrgId, with or without multi-factor auth.

## Build
To build this repository, you will need maven 2.0+ and gradle 1.6+.

## Contributing
This repository is for runtime & authentication specifically. For issues in the generated code, please report in [AutoRest](https://github.com/Azure/autorest). For bugs in the Azure SDK, please report in [Azure SDK for Java](https://github.com/Azure/azure-sdk-for-java). If you are unsure, please file here and state that clearly in the issue. Pull requests are welcomed with clear Javadocs.
117 changes: 117 additions & 0 deletions common/azure-android-client-authentication/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
buildscript {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We aren't using gradle to build so we should convert to maven projects during the clean-up.

repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}

apply plugin: 'com.android.library'
apply plugin: 'maven'

android {
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0.0-beta6-SNAPSHOT"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

lintOptions {
abortOnError false
}
}

configurations {
deployerJars
}

repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.microsoft.aad:adal:1.1.11'
compile 'com.microsoft.azure:azure-client-runtime:1.0.0-beta2'
testCompile 'junit:junit:4.12'
testCompile 'junit:junit-dep:4.11'
deployerJars "org.apache.maven.wagon:wagon-ftp:2.10"
}

uploadArchives {
repositories {
mavenDeployer {
configuration = configurations.deployerJars
snapshotRepository(url: "ftp://waws-prod-bay-005.ftp.azurewebsites.windows.net/site/wwwroot/") {
authentication(userName: username, password: password)
}
repository(url: "file://$buildDir/repository")
pom.setArtifactId "azure-android-client-authentication"
pom.project {
name 'Microsoft Azure AutoRest Authentication Library for Java'
description 'This is the authentication library for AutoRest generated Azure Java clients.'
url 'https://github.com/Azure/autorest'

scm {
url 'scm:git:https://github.com/Azure/AutoRest'
connection 'scm:git:git://github.com/Azure/AutoRest.git'
}

licenses {
license {
name 'The MIT License (MIT)'
url 'http://opensource.org/licenses/MIT'
distribution 'repo'
}
}

developers {
developer {
id 'microsoft'
name 'Microsoft'
}
}
}
}
}
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}

task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
options.encoding = 'UTF-8'
}

task javadocJar(type: Jar, dependsOn: [javadoc]) {
classifier = 'javadoc'
from javadoc.destinationDir
}

artifacts {
archives sourcesJar
archives javadocJar
}
2 changes: 2 additions & 0 deletions common/azure-android-client-authentication/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
username = fake
password = fake
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Wed Nov 11 13:21:00 PST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-bin.zip
Loading