public static class StandardRequest.VolumeRequest extends Object implements Request
Note This should be a StandardRequest.MediaRequest, but since that would
also make it a StandardMessage which maps type using
Jackson subtypes, it isn't. The reason is that another implementation,
StandardRequest.SetVolume, is already mapped to "SET_VOLUME" which is the
same type as this request uses. The differences between the two
is the namespace, but that isn't captured by the Jackson subtype logic,
which is why this implementation is only a Request that "manually
implements" the remaining fields required for a StandardRequest.MediaRequest.
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
customData
Custom data for the receiver application
|
protected int |
mediaSessionId
The media session ID
|
protected long |
requestId
the request ID
|
protected String |
sessionId
The session ID
|
protected String |
type
The request type
|
protected MediaVolume |
volume
The new volume of the stream.
|
| Constructor and Description |
|---|
VolumeRequest(String sessionId,
int mediaSessionId,
MediaVolume volume,
Map<String,Object> customData)
Creates a new request using the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
getCustomData() |
int |
getMediaSessionId() |
long |
getRequestId() |
String |
getSessionId() |
MediaVolume |
getVolume() |
void |
setRequestId(long requestId)
Sets the request ID.
|
protected final int mediaSessionId
protected final String sessionId
protected long requestId
protected final String type
@Nonnull protected final MediaVolume volume
public VolumeRequest(String sessionId, int mediaSessionId, @Nonnull MediaVolume volume, @Nullable Map<String,Object> customData)
sessionId - the session ID to use.mediaSessionId - the media session ID for which the seek request
applies.volume - the new volume of the stream. At least one of level or
muted must be set.customData - the custom data for the receiver application.IllegalArgumentException - If sessionId or
volume is null.@Nonnull public MediaVolume getVolume()
@Nullable public Map<String,Object> getCustomData()
public void setRequestId(long requestId)
RequestChannel.setRequestId in interface RequestrequestId - the request ID to set.public long getRequestId()
getRequestId in interface Requestpublic int getMediaSessionId()
public String getSessionId()
Copyright © 2022. All rights reserved.