@Generated(value="OracleSDKGenerator", comments="API Version: 20181201") public class FunctionsInvokeClient extends Object implements FunctionsInvoke
Modifier and Type | Class and Description |
---|---|
static class |
FunctionsInvokeClient.Builder
Builder class for this client.
|
Modifier and Type | Field and Description |
---|---|
static Service |
SERVICE
Service instance for FunctionsInvoke.
|
Modifier | Constructor and Description |
---|---|
|
FunctionsInvokeClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory)
Creates a new service instance using the given authentication provider and client configuration.
|
|
FunctionsInvokeClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
List<ClientConfigurator> additionalClientConfigurators)
Creates a new service instance using the given authentication provider and client configuration.
|
|
FunctionsInvokeClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
List<ClientConfigurator> additionalClientConfigurators,
String endpoint)
Creates a new service instance using the given authentication provider and client configuration.
|
|
FunctionsInvokeClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories,
List<ClientConfigurator> additionalClientConfigurators,
String endpoint)
Creates a new service instance using the given authentication provider and client configuration.
|
protected |
FunctionsInvokeClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator,
RequestSignerFactory defaultRequestSignerFactory,
Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories,
List<ClientConfigurator> additionalClientConfigurators,
String endpoint,
RestClientFactoryBuilder restClientFactoryBuilder)
Creates a new service instance using the given authentication provider and client configuration.
|
|
FunctionsInvokeClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Creates a new service instance using the given authentication provider.
|
|
FunctionsInvokeClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration)
Creates a new service instance using the given authentication provider and client configuration.
|
|
FunctionsInvokeClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider,
ClientConfiguration configuration,
ClientConfigurator clientConfigurator)
Creates a new service instance using the given authentication provider and client configuration.
|
Modifier and Type | Method and Description |
---|---|
static FunctionsInvokeClient.Builder |
builder()
Create a builder for this client.
|
void |
close() |
String |
getEndpoint()
Gets the set endpoint for REST call (ex, https://www.example.com)
|
InvokeFunctionResponse |
invokeFunction(InvokeFunctionRequest request)
Invokes a function
|
void |
refreshClient()
Rebuilds the client from scratch.
|
void |
setEndpoint(String endpoint)
Sets the endpoint to call (ex, https://www.example.com).
|
void |
setRegion(Region region)
Sets the region to call (ex, Region.US_PHOENIX_1).
|
void |
setRegion(String regionId)
Sets the region to call (ex, ‘us-phoenix-1’).
|
public static final Service SERVICE
Service instance for FunctionsInvoke.
public FunctionsInvokeClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider)
Creates a new service instance using the given authentication provider.
authenticationDetailsProvider
- The authentication details provider, required.public FunctionsInvokeClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration)
Creates a new service instance using the given authentication provider and client configuration.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.public FunctionsInvokeClient(BasicAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator)
Creates a new service instance using the given authentication provider and client configuration. Additionally, a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.clientConfigurator
- ClientConfigurator that will be invoked for additional configuration of a REST client, optional.public FunctionsInvokeClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory)
Creates a new service instance using the given authentication provider and client configuration. Additionally, a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
This is an advanced constructor for clients that want to take control over how requests are signed.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.clientConfigurator
- ClientConfigurator that will be invoked for additional configuration of a REST client, optional.defaultRequestSignerFactory
- The request signer factory used to create the request signer for this service.public FunctionsInvokeClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators)
Creates a new service instance using the given authentication provider and client configuration. Additionally, a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
This is an advanced constructor for clients that want to take control over how requests are signed.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.clientConfigurator
- ClientConfigurator that will be invoked for additional configuration of a REST client, optional.defaultRequestSignerFactory
- The request signer factory used to create the request signer for this service.additionalClientConfigurators
- Additional client configurators to be run after the primary configurator.public FunctionsInvokeClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Creates a new service instance using the given authentication provider and client configuration. Additionally, a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
This is an advanced constructor for clients that want to take control over how requests are signed.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.clientConfigurator
- ClientConfigurator that will be invoked for additional configuration of a REST client, optional.defaultRequestSignerFactory
- The request signer factory used to create the request signer for this service.additionalClientConfigurators
- Additional client configurators to be run after the primary configurator.endpoint
- Endpoint, or null to leave unset (note, may be overridden by authenticationDetailsProvider
)public FunctionsInvokeClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint)
Creates a new service instance using the given authentication provider and client configuration. Additionally, a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
This is an advanced constructor for clients that want to take control over how requests are signed.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.clientConfigurator
- ClientConfigurator that will be invoked for additional configuration of a REST client, optional.defaultRequestSignerFactory
- The request signer factory used to create the request signer for this service.signingStrategyRequestSignerFactories
- The request signer factories for each signing strategy used to create the request signeradditionalClientConfigurators
- Additional client configurators to be run after the primary configurator.endpoint
- Endpoint, or null to leave unset (note, may be overridden by authenticationDetailsProvider
)protected FunctionsInvokeClient(AbstractAuthenticationDetailsProvider authenticationDetailsProvider, ClientConfiguration configuration, ClientConfigurator clientConfigurator, RequestSignerFactory defaultRequestSignerFactory, Map<SigningStrategy,RequestSignerFactory> signingStrategyRequestSignerFactories, List<ClientConfigurator> additionalClientConfigurators, String endpoint, RestClientFactoryBuilder restClientFactoryBuilder)
Creates a new service instance using the given authentication provider and client configuration. Additionally, a Consumer can be provided that will be invoked whenever a REST Client is created to allow for additional configuration/customization.
This is an advanced constructor for clients that want to take control over how requests are signed.
Use the FunctionsInvokeClient.Builder
to get access to all these parameters.
authenticationDetailsProvider
- The authentication details provider, required.configuration
- The client configuration, optional.clientConfigurator
- ClientConfigurator that will be invoked for additional configuration of a REST client, optional.defaultRequestSignerFactory
- The request signer factory used to create the request signer for this service.signingStrategyRequestSignerFactories
- The request signer factories for each signing strategy used to create the request signeradditionalClientConfigurators
- Additional client configurators to be run after the primary configurator.endpoint
- Endpoint, or null to leave unset (note, may be overridden by authenticationDetailsProvider
)restClientFactoryBuilder
- the builder for the RestClientFactory
public static FunctionsInvokeClient.Builder builder()
Create a builder for this client.
public void refreshClient()
FunctionsInvoke
Rebuilds the client from scratch. Useful to refresh certificates.
refreshClient
in interface FunctionsInvoke
public void setEndpoint(String endpoint)
FunctionsInvoke
Sets the endpoint to call (ex, https://www.example.com).
setEndpoint
in interface FunctionsInvoke
endpoint
- The endpoint of the service.public String getEndpoint()
FunctionsInvoke
Gets the set endpoint for REST call (ex, https://www.example.com)
getEndpoint
in interface FunctionsInvoke
public void setRegion(Region region)
FunctionsInvoke
Sets the region to call (ex, Region.US_PHOENIX_1).
Note, this will call setEndpoint
after resolving the endpoint. If the service is not available in this Region, however, an IllegalArgumentException will be raised.
setRegion
in interface FunctionsInvoke
region
- The region of the service.public void setRegion(String regionId)
FunctionsInvoke
Sets the region to call (ex, ‘us-phoenix-1’).
Note, this will first try to map the region ID to a known Region and call
setRegion
.
If no known Region could be determined, it will create an endpoint based on the
default endpoint format (Region.formatDefaultRegionEndpoint(Service, String)
and then call setEndpoint
.
setRegion
in interface FunctionsInvoke
regionId
- The public region ID.public void close()
close
in interface AutoCloseable
public InvokeFunctionResponse invokeFunction(InvokeFunctionRequest request)
FunctionsInvoke
Invokes a function
Note: This operation consumes a stream.
If the stream supports InputStream.mark(int)
and InputStream.reset()
, when a retry is
necessary, the stream is reset so it starts at the beginning (or whatever the stream’s position was at the time this
operation is called}.
Note this means that if the caller has used InputStream.mark(int)
before, then the mark
will not be the same anymore after this operation, and a subsequent call to InputStream.reset()
by
the caller will reset the stream not to the caller’s mark, but to the position the stream was in when this operation
was called.
If the stream is a FileInputStream
, and the stream’s FileChannel
position
can be changed (like for a regular file), the stream will be wrapped in such a way that it does provide
support for InputStream.mark(int)
and InputStream.reset()
. Then the same procedure as
above is followed. If the stream’s FileChannel
position cannot be changed (like for a
named pipe), then the stream’s contents will be buffered in memory, as described below.
If the stream does not support InputStream.mark(int)
and InputStream.reset()
, then
the stream is wrapped in a BufferedInputStream
, which means the entire contents may
be buffered in memory. Then the same procedure as above is followed.
The contents of the stream, except when the stream is a FileInputStream
whose
FileChannel
position can be changed, should be less than 2 GiB in size if retries are used.
This is because streams 2 GiB in size or larger do no guarantee that mark-and-reset can be performed. If the stream
is larger, do not use built-in retries and manage retries yourself.
invokeFunction
in interface FunctionsInvoke
request
- The request object containing the details to sendCopyright © 2016–2022. All rights reserved.