Class BmcRequest<B>
- java.lang.Object
-
- com.oracle.bmc.requests.BmcRequest<B>
-
- Type Parameters:
B- type of the body parameter
public class BmcRequest<B> extends Object
Request base class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceBmcRequest.Builder<T extends BmcRequest<B>,B>Builder interface for requests.
-
Constructor Summary
Constructors Constructor Description BmcRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Uses getInvocationCallback and getRetryConfiguration to determine if passed request is equal to ‘this’.BgetBody$()Alternative accessor for the body parameter, if this request supports a body.Consumer<javax.ws.rs.client.Invocation.Builder>getInvocationCallback()Optional consumer that will be invoked before the actual REST call is made.RetryConfigurationgetRetryConfiguration()OptionalRetryConfigurationto use for this request.inthashCode()Uses invocationCallback and retryConfiguration to generate a hash.voidsetInvocationCallback(Consumer<javax.ws.rs.client.Invocation.Builder> invocationCallback)Optional consumer that will be invoked before the actual REST call is made.voidsetRetryConfiguration(RetryConfiguration retryConfiguration)OptionalRetryConfigurationto use for this request.booleansupportsExpect100Continue()Returns true if this operation supports Expect: 100-Continue.
-
-
-
Method Detail
-
getBody$
public B getBody$()
Alternative accessor for the body parameter, if this request supports a body.If this request does not support a body, an
IllegalStateExceptionis thrown.- Returns:
- body parameter
- Throws:
IllegalStateException- if this request does not support a body
-
supportsExpect100Continue
public boolean supportsExpect100Continue()
Returns true if this operation supports Expect: 100-Continue.- Returns:
- true if this operation supports Expect: 100-Continue.
-
equals
public boolean equals(Object o)
Uses getInvocationCallback and getRetryConfiguration to determine if passed request is equal to ‘this’.
-
hashCode
public int hashCode()
Uses invocationCallback and retryConfiguration to generate a hash.
-
setInvocationCallback
public void setInvocationCallback(Consumer<javax.ws.rs.client.Invocation.Builder> invocationCallback)
Optional consumer that will be invoked before the actual REST call is made.Allows callers to alter/add any parameters that were not directly configurable otherwise. Attempting to invoke or build the builder in any way will result in an exception.
For the
Invocation.Builder.headers(MultivaluedMap)method, note that modifying the passed in headers map after the call does not have any effect on headers set.
-
getInvocationCallback
public Consumer<javax.ws.rs.client.Invocation.Builder> getInvocationCallback()
Optional consumer that will be invoked before the actual REST call is made.Allows callers to alter/add any parameters that were not directly configurable otherwise. Attempting to invoke or build the builder in any way will result in an exception.
For the
Invocation.Builder.headers(MultivaluedMap)method, note that modifying the passed in headers map after the call does not have any effect on headers set.
-
setRetryConfiguration
public void setRetryConfiguration(RetryConfiguration retryConfiguration)
OptionalRetryConfigurationto use for this request.Note: This overrides the retry configurations set on the client (via
ClientConfigurationand SDK level (viaRetriers.setDefaultRetryConfiguration(RetryConfiguration)
-
getRetryConfiguration
public RetryConfiguration getRetryConfiguration()
OptionalRetryConfigurationto use for this request.Note: This overrides the retry configurations set on the client (via
ClientConfigurationand SDK level (viaRetriers.setDefaultRetryConfiguration(RetryConfiguration)
-
-