Top Description Inners Fields Constructors Methods
com.oracle.bmc

public Class ClientRuntime

extends Object
Class Inheritance
Imports
com.oracle.bmc.util.internal.ClientCompatibilityChecker, .StringUtils, org.slf4j.Logger, java.io.IOException, .InputStream, java.util.Properties

This class provides client info that will be sent to the servers as part of each request.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final ClientCompatibilityChecker
private final String
clientInfo

The SDK client info to send.

private static String
clientUserAgent

Sets an extra piece of information into the user-agent header passed to the server.

private static final String
private static final Logger
public static final String
private final String
private final String
userAgent

The user agent to send.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public static String
public ClientCompatibilityChecker
public String
public static ClientRuntime

Returns:

The ClientRuntime instance.
getRuntime
()

Get the ClientRuntime instance.

pack-priv static Properties
public String
public String
public static void
setClientUserAgent(String clientUserAgent)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

clientCompatibilityCheckerback to summary
private final ClientCompatibilityChecker clientCompatibilityChecker
clientInfoback to summary
private final String clientInfo

The SDK client info to send.

clientUserAgentback to summary
private static String clientUserAgent

Sets an extra piece of information into the user-agent header passed to the server. The format is (by convention) "Application/Version", ex "MyApp/1.3.5".

Note, this must be called BEFORE any service calls are ever made, and once set, cannot be changed after a call has been made.

ENV_VAR_USER_AGENTback to summary
private static final String ENV_VAR_USER_AGENT
LOGback to summary
private static final Logger LOG
SDK_VERSION_PROPERTY_NAMEback to summary
public static final String SDK_VERSION_PROPERTY_NAME
sdkVersionback to summary
private final String sdkVersion
userAgentback to summary
private final String userAgent

The user agent to send.

The agent will include runtime information, ex: Oracle-JavaSDK/1.0.0 (Linux/3.10.0-229.el7.x86_64; Java/1.8.0_60; Java HotSpot(TM) 64-Bit Server VM/25.60-b23)

Constructor Detail

ClientRuntimeback to summary
pack-priv ClientRuntime()

Method Detail

extractSdkVersionFromPropertiesback to summary
public static String extractSdkVersionFromProperties(Properties sdkProperties)
getClientCompatibilityCheckerback to summary
public ClientCompatibilityChecker getClientCompatibilityChecker()
getClientInfoback to summary
public String getClientInfo()
getRuntimeback to summary
public static ClientRuntime getRuntime()

Get the ClientRuntime instance.

Returns:ClientRuntime

The ClientRuntime instance.

getSdkPropertiesback to summary
pack-priv static Properties getSdkProperties()
getSdkVersionback to summary
public String getSdkVersion()
getUserAgentback to summary
public String getUserAgent()
setClientUserAgentback to summary
public static void setClientUserAgent(String clientUserAgent)
com.oracle.bmc back to summary

private Class ClientRuntime.RuntimeInstance

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final ClientRuntime

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
private static final ClientRuntime INSTANCE

Constructor Detail

RuntimeInstanceback to summary
private RuntimeInstance()