-
public class CustomerRightsToken
An immutable transfer object that can be set the absolute expiration and play duration when requesting an offline playback license.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
CustomerRightsToken.PurchaseLicense
Purchase license describes properties of license that has no time restrictions.
public class
CustomerRightsToken.RentalLicense
The rental license describes the time restrictions to be imposed on the license.
public class
CustomerRightsToken.RentalProfile
Rental profile must be used for requesting a license with time restrictions.
public class
CustomerRightsToken.PurchaseProfile
Purchase must be used for requesting a license without time restrictions.
-
Field Summary
Fields Modifier and Type Field Description public final CustomerRightsToken.Profile
profile
public final Boolean
storeLicense
public final OutputProtection
outputProtection
-
Constructor Summary
Constructors Constructor Description CustomerRightsToken(CustomerRightsToken.Profile profile, boolean storeLicense)
Creates a new customers rights token. CustomerRightsToken(CustomerRightsToken.Profile profile, boolean storeLicense, CustomerRightsTokenConfig config)
Creates a new customers rights token.
-
Method Summary
Modifier and Type Method Description static CustomerRightsToken
createRentalRightsToken(@NonNull() Date absoluteExpiration, @NonNull() Long playDuration, boolean storeLicense)
Creates a CustomerRightsToken for requesting a license with time restrictions. static CustomerRightsToken
createRentalRightsToken(@NonNull() Date absoluteExpiration, @NonNull() Long playDuration)
Creates a CustomerRightsToken for requesting a persistent license with thespecified absolute expiration period static CustomerRightsToken
createRentalRightsToken(@NonNull() Date absoluteExpiration, @NonNull() Long playDuration, @NonNull() CustomerRightsTokenConfig config)
Creates a CustomerRightsToken for requesting a persistent license with thespecified absolute expiration period static CustomerRightsToken
createPurchaseRightsToken()
Creates a CustomerRightsToken for requesting a persistent license witha purchase profile static CustomerRightsToken
createPurchaseRightsToken(@NonNull() CustomerRightsTokenConfig config)
Creates a CustomerRightsToken for requesting a persistent license witha purchase profile -
-
Constructor Detail
-
CustomerRightsToken
CustomerRightsToken(CustomerRightsToken.Profile profile, boolean storeLicense)
Creates a new customers rights token.- Parameters:
profile
- the profile for the offline license request.storeLicense
- specifies whether the license is persistent
-
CustomerRightsToken
CustomerRightsToken(CustomerRightsToken.Profile profile, boolean storeLicense, CustomerRightsTokenConfig config)
Creates a new customers rights token.- Parameters:
profile
- the profile for the offline license request.storeLicense
- specifies whether the license is persistent.config
- specifies extra and optional configuration.
-
-
Method Detail
-
createRentalRightsToken
@NonNull() static CustomerRightsToken createRentalRightsToken(@NonNull() Date absoluteExpiration, @NonNull() Long playDuration, boolean storeLicense)
Creates a CustomerRightsToken for requesting a license with time restrictions.
- Parameters:
absoluteExpiration
- defines how long the license is valid to start playback.playDuration
- defines in milliseconds how long the content can be consumedafter the start of playback.storeLicense
- specifies whether the license is persistent
-
createRentalRightsToken
@NonNull() static CustomerRightsToken createRentalRightsToken(@NonNull() Date absoluteExpiration, @NonNull() Long playDuration)
Creates a CustomerRightsToken for requesting a persistent license with thespecified absolute expiration period
- Parameters:
absoluteExpiration
- defines how long the license is valid to start playback.playDuration
- defines in milliseconds how long the content can be consumedafter the start of playback.
-
createRentalRightsToken
@NonNull() static CustomerRightsToken createRentalRightsToken(@NonNull() Date absoluteExpiration, @NonNull() Long playDuration, @NonNull() CustomerRightsTokenConfig config)
Creates a CustomerRightsToken for requesting a persistent license with thespecified absolute expiration period
- Parameters:
absoluteExpiration
- defines how long the license is valid to start playback.playDuration
- defines in milliseconds how long the content can be consumedafter the start of playback.config
- defines additional configuration for the CustomerRightsToken
-
createPurchaseRightsToken
@NonNull() static CustomerRightsToken createPurchaseRightsToken()
Creates a CustomerRightsToken for requesting a persistent license witha purchase profile
-
createPurchaseRightsToken
@NonNull() static CustomerRightsToken createPurchaseRightsToken(@NonNull() CustomerRightsTokenConfig config)
Creates a CustomerRightsToken for requesting a persistent license witha purchase profile
- Parameters:
config
- defines additional configuration for the CustomerRightsToken
-
-
-
-