Package com.oracle.content.sdk
Class ContentSDK
java.lang.Object
com.oracle.content.sdk.ContentSDK
Main entry point for creating a delivery client using
createDeliveryClient(String, String)
or for setting the global logging options such as setLogLevel(ContentLogging.LogLevel).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ContentDeliveryClientcreateDeliveryClient(String contentServer, AuthenticationPolicy authenticationPolicy, @NotNull ContentSettings settings) Creates aContentDeliveryClientgiven a valid server url and authentication policy, and provide additional settings such as enabling caching or changing the timeout.static @NotNull ContentDeliveryClientcreateDeliveryClient(String contentServer, String channelToken) Creates aContentDeliveryClientgiven a valid server url and channel token.static @NotNull ContentDeliveryClientcreateDeliveryClient(String contentServer, String channelToken, @NotNull ContentSettings settings) Creates aContentDeliveryClientgiven a valid server url and channel token, and provide additional settings such as enabling caching or changing the timeout.static voidsetLoggingPolicy(@NotNull ContentLogging contentLogging) Specifies a custom logging policy.static voidsetLogLevel(ContentLogging.LogLevel logLevel) Set the logging level globally for all SDK clients.
-
Constructor Details
-
ContentSDK
public ContentSDK()
-
-
Method Details
-
createDeliveryClient
@NotNull public static @NotNull ContentDeliveryClient createDeliveryClient(String contentServer, String channelToken) Creates aContentDeliveryClientgiven a valid server url and channel token. This is the simplest way to create a client as it uses all of the defaults for settings. This method will throw aContentExceptionif the server or channel token are null or empty.- Parameters:
contentServer- the URL to a server instancechannelToken- channel token required for authentication- Returns:
- new
ContentDeliveryClient
-
createDeliveryClient
@NotNull public static @NotNull ContentDeliveryClient createDeliveryClient(String contentServer, String channelToken, @NotNull @NotNull ContentSettings settings) Creates aContentDeliveryClientgiven a valid server url and channel token, and provide additional settings such as enabling caching or changing the timeout. SeeContentSettings- Parameters:
contentServer- the URL to a server instancechannelToken- channel token required for authenticationsettings- Settings for the SDK- Returns:
- new
ContentDeliveryClient
-
createDeliveryClient
@NotNull public static @NotNull ContentDeliveryClient createDeliveryClient(String contentServer, AuthenticationPolicy authenticationPolicy, @NotNull @NotNull ContentSettings settings) Creates aContentDeliveryClientgiven a valid server url and authentication policy, and provide additional settings such as enabling caching or changing the timeout. SeeContentSettings- Parameters:
contentServer- the URL to a server instanceauthenticationPolicy- authentication policy to use for SDKsettings- Settings for the SDK- Returns:
- new
ContentDeliveryClient
-
setLogLevel
Set the logging level globally for all SDK clients. This must be called prior to any calls to create the delivery client.- Parameters:
logLevel- Specify the desired level of logging usingContentLogging.LogLevel
-
setLoggingPolicy
Specifies a custom logging policy. Use this method if you want to intercept the SDK log output for your own use. SeeContentLogging- Parameters:
contentLogging- ValidContentLogging
-