Interface CommandParameters
-
public interface CommandParameters
Interface that defines parameters for a
CommandSubscription
.The interface currently allows you to define a just a single parameter that makes the command persistent.
You can create an instance of this interface by calling
createCommandParameters()
on acom.caplin.streamlink.StreamLink
instance. Then, after setting up the parameters you can apply to a command by passing into the appropriatepublish()
,create()
etc method on theStreamLink
object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CommandParameters
addHeader(java.lang.String name, java.lang.String value)
For REST operations this adds a HTTP header to be used by the resulting REST request.java.lang.Object
getPayload()
Gets the payloadPayloadType
getPayloadType()
Gets the payload typeCommandParameters
setCancellable()
Sets the command associated with a CommandSubscription to be cancelled in the event that the connection goes down before it is sent.CommandParameters
setPayload(java.lang.Object obj)
Sets the payload object, this should be of the type specified in the payload type.CommandParameters
setPayloadType(PayloadType type)
Sets the type of the payloadCommandParameters
setPersistent()
Sets the command associated with a CommandSubscription to be persistent.
-
-
-
Method Detail
-
getPayload
java.lang.Object getPayload()
Gets the payload- Returns:
- the payload
-
getPayloadType
PayloadType getPayloadType()
Gets the payload type- Returns:
- the payload type
-
setPayload
CommandParameters setPayload(java.lang.Object obj)
Sets the payload object, this should be of the type specified in the payload type.- Parameters:
obj
- the payload ojbject
-
setPayloadType
CommandParameters setPayloadType(PayloadType type)
Sets the type of the payload- Parameters:
type
- the payload type
-
setPersistent
CommandParameters setPersistent()
Sets the command associated with a CommandSubscription to be persistent. This deals with the situation where the connection to the Liberator server has been lost, and on subsequent reconnection StreamLink must create a brand new user session and log in to Liberator again. When this happens, the "persistent" command is automatically re-sent to the Liberator.
- Returns:
- The updated
CommandParameters
object (to permit a fluent programming style).
-
setCancellable
CommandParameters setCancellable()
Sets the command associated with a CommandSubscription to be cancelled in the event that the connection goes down before it is sent.
- Returns:
- The updated
CommandParameters
object (to permit a fluent programming style).
-
addHeader
CommandParameters addHeader(java.lang.String name, java.lang.String value)
For REST operations this adds a HTTP header to be used by the resulting REST request. The order in which the headers are added will be the order in which they are applied to the REST operation.
- Parameters:
name
- the name of the HTTP headervalue
- the value of the header- Returns:
- The updated
CommandParameters
object (to permit a fluent programming style).
-
-