Interface CmcdConfiguration.RequestConfig
-
- Enclosing class:
- CmcdConfiguration
public static interface CmcdConfiguration.RequestConfig
Represents configuration which can vary on each request.Implementations must not make assumptions about which thread called their methods; and must be thread-safe.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default ImmutableMap<@HeaderKey String,String>
getCustomData()
Retrieves the custom data associated with CMCD logging.default int
getRequestedMaximumThroughputKbps(int throughputKbps)
Returns the maximum throughput requested in kbps, orC.RATE_UNSET_INT
if the maximum throughput is unknown in which case the maximum throughput will not be logged upstream.default boolean
isKeyAllowed(@CmcdKey String key)
Checks whether the specified key is allowed in CMCD logging.
-
-
-
Method Detail
-
isKeyAllowed
default boolean isKeyAllowed(@CmcdKey String key)
Checks whether the specified key is allowed in CMCD logging. By default, all keys are allowed.- Parameters:
key
- The key to check.- Returns:
- Whether the key is allowed.
-
getCustomData
default ImmutableMap<@HeaderKey String,String> getCustomData()
Retrieves the custom data associated with CMCD logging.By default, no custom data is provided.
The key should belong to the
CmcdConfiguration.HeaderKey
. The value should consist of key-value pairs separated by commas. If the value contains one of the keys defined in theCmcdConfiguration.CmcdKey
list, then this key should not be allowed, otherwise the key could be included twice in the produced log.Example:
- CMCD-Request:customField1=25400
- CMCD-Object:customField2=3200,customField3=4004,customField4=v,customField5=6000
- CMCD-Status:customField6,customField7=15000
- CMCD-Session:customField8="6e2fb550-c457-11e9-bb97-0800200c9a66"
- Returns:
- An
ImmutableMap
containing the custom data.
-
getRequestedMaximumThroughputKbps
default int getRequestedMaximumThroughputKbps(int throughputKbps)
Returns the maximum throughput requested in kbps, orC.RATE_UNSET_INT
if the maximum throughput is unknown in which case the maximum throughput will not be logged upstream.- Parameters:
throughputKbps
- The throughput in kbps of the audio or video object being requested.- Returns:
- The maximum throughput requested in kbps.
-
-