Top Description Inners Fields Constructors Methods
com.oracle.bmc.requests

public Class BmcRequest<B>

extends Object
Class Inheritance
Known Direct Subclasses
com.oracle.bmc.auth.SessionTokenAuthenticationDetailsProvider.SessionTokenRefreshRequest, com.oracle.bmc.auth.internal.X509FederationClient.FederationRequestWrapper
Type Parameters
<B>
type of the body parameter
Imports
com.fasterxml.jackson.annotation.JsonIgnore, com.oracle.bmc.http.client.RequestInterceptor, com.oracle.bmc.retrier.RetryConfiguration, java.util.Objects

Request base class.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
BmcRequest.Builder<
type of the request
T extends BmcRequest<B>
,
type of the body parameter (use Void if no body)
B
>

Builder interface for requests.

Field Summary

Modifier and TypeField and Description
private RequestInterceptor
invocationCallback

Optional consumer that will be invoked before the actual REST call is made.

private RetryConfiguration
retryConfiguration

Optional RetryConfiguration to use for this request.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Uses getInvocationCallback and getRetryConfiguration to determine if passed request is equal to 'this'.

public B

Returns:

body parameter
getBody$
()

Alternative accessor for the body parameter, if this request supports a body.

public RequestInterceptor
getInvocationCallback()

Optional consumer that will be invoked before the actual REST call is made.

public RetryConfiguration
getRetryConfiguration()

Optional RetryConfiguration to use for this request.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Uses getInvocationCallback and getRetryConfiguration to generate a hash.

public void
setInvocationCallback(final RequestInterceptor invocationCallback)

Optional consumer that will be invoked before the actual REST call is made.

public void
setRetryConfiguration(final RetryConfiguration retryConfiguration)

Optional RetryConfiguration to use for this request.

public boolean

Returns:

true if this operation supports Expect: 100-Continue.
supportsExpect100Continue
()

Returns true if this operation supports Expect: 100-Continue.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

invocationCallbackback to summary
private RequestInterceptor 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 headers(MultivalueMap) method, note that modifying the passed in headers map after the call does not have any effect on headers set.

retryConfigurationback to summary
private RetryConfiguration retryConfiguration

Optional RetryConfiguration to use for this request.

Note

This overrides the retry configurations set on the client (via com.oracle.bmc.ClientConfiguration and SDK level (via com.oracle.bmc.retrier.Retriers#setDefaultRetryConfiguration(RetryConfiguration)

Constructor Detail

BmcRequestback to summary
public BmcRequest()

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.equals.

Uses getInvocationCallback and getRetryConfiguration to determine if passed request is equal to 'this'.

Parameters
o:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getBody$back to summary
public B getBody$()

Alternative accessor for the body parameter, if this request supports a body.

If this request does not support a body, an IllegalStateException is thrown.

Returns:B

body parameter

Annotations
@JsonIgnore
@InternalSdk
Exceptions
IllegalStateException:
if this request does not support a body
getInvocationCallbackback to summary
public RequestInterceptor 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.

getRetryConfigurationback to summary
public RetryConfiguration getRetryConfiguration()

Optional RetryConfiguration to use for this request.

Note

This overrides the retry configurations set on the client (via com.oracle.bmc.ClientConfiguration and SDK level (via com.oracle.bmc.retrier.Retriers#setDefaultRetryConfiguration(RetryConfiguration)

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Uses getInvocationCallback and getRetryConfiguration to generate a hash.

Returns:int

Doc from java.lang.Object.hashCode.

a hash code value for this object

Annotations
@Override
setInvocationCallbackback to summary
public void setInvocationCallback(final RequestInterceptor 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.

setRetryConfigurationback to summary
public void setRetryConfiguration(final RetryConfiguration retryConfiguration)

Optional RetryConfiguration to use for this request.

Note

This overrides the retry configurations set on the client (via com.oracle.bmc.ClientConfiguration and SDK level (via com.oracle.bmc.retrier.Retriers#setDefaultRetryConfiguration(RetryConfiguration)

supportsExpect100Continueback to summary
public boolean supportsExpect100Continue()

Returns true if this operation supports Expect: 100-Continue.

Returns:boolean

true if this operation supports Expect: 100-Continue.

Annotations
@JsonIgnore
@InternalSdk
com.oracle.bmc.requests back to summary

public Interface BmcRequest.Builder<T extends BmcRequest<B>, B>

Type Parameters
<T>
type of the request
<B>
type of the body parameter (use Void if no body)

Builder interface for requests.

Method Summary

Modifier and TypeMethod and Description
public default BmcRequest.Builder<T, B>

Returns:

this builder instance
body$
(B
the body parameter
body
)

Alternative setter for the body parameter, if this request supports a body.

public T

Returns:

request
build
()

Build the request.

public BmcRequest.Builder<T, B>

Returns:

this builder instance
copy
(T
other request from which to copy values
o
)

Copy method to populate the builder with values from the given instance.

Method Detail

body$back to summary
public default BmcRequest.Builder<T, B> body$(B body)

Alternative setter for the body parameter, if this request supports a body.

If this request does not support a body, an IllegalStateException is thrown.

Parameters
body:B

the body parameter

Returns:BmcRequest.Builder<T, B>

this builder instance

Annotations
@InternalSdk
Exceptions
IllegalStateException:
if this request does not support a body
buildback to summary
public T build()

Build the request.

Returns:T

request

copyback to summary
public BmcRequest.Builder<T, B> copy(T o)

Copy method to populate the builder with values from the given instance.

Parameters
o:T

other request from which to copy values

Returns:BmcRequest.Builder<T, B>

this builder instance