Package com.azure.core.http.policy
Class HttpPipelineSyncPolicy
java.lang.Object
com.azure.core.http.policy.HttpPipelineSyncPolicy
- All Implemented Interfaces:
HttpPipelinePolicy
Represents a
HttpPipelinePolicy
that doesn't do any asynchronous or synchronously blocking operations.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected HttpResponse
afterReceivedResponse
(HttpPipelineCallContext context, HttpResponse response) Method is invoked after the response is received.protected void
Method is invoked before the request is sent.final Mono<HttpResponse>
process
(HttpPipelineCallContext context, HttpPipelineNextPolicy next) Processes provided request context and invokes the next policy.final HttpResponse
processSync
(HttpPipelineCallContext context, HttpPipelineNextSyncPolicy next) Processes provided request context and invokes the next policy synchronously.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.core.http.policy.HttpPipelinePolicy
getPipelinePosition
-
Constructor Details
-
HttpPipelineSyncPolicy
public HttpPipelineSyncPolicy()
-
-
Method Details
-
process
public final Mono<HttpResponse> process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) Processes provided request context and invokes the next policy.- Specified by:
process
in interfaceHttpPipelinePolicy
- Parameters:
context
- The request context.next
- The next policy to invoke.- Returns:
- A publisher that initiates the request upon subscription and emits a response on completion.
-
processSync
public final HttpResponse processSync(HttpPipelineCallContext context, HttpPipelineNextSyncPolicy next) Processes provided request context and invokes the next policy synchronously.- Specified by:
processSync
in interfaceHttpPipelinePolicy
- Parameters:
context
- The request context.next
- The next policy to invoke.- Returns:
- A publisher that initiates the request upon subscription and emits a response on completion.
-
beforeSendingRequest
Method is invoked before the request is sent.- Parameters:
context
- The request context.
-
afterReceivedResponse
protected HttpResponse afterReceivedResponse(HttpPipelineCallContext context, HttpResponse response) Method is invoked after the response is received.- Parameters:
context
- The request context.response
- The response received.- Returns:
- The transformed response.
-