Class
caplin.streamlink.alerts

TriggerService

A TriggerService subscribes to the Triggers of a StreamLink user and allows the user to register a listener to be called back when triggers are added, removed or modified.

The service itself does not subscribe to anything unless listeners are added to it. For every listener added one subscription is being issued. These subscriptions induce the service state for the associated listeners. Therefore the service states can vary for different listeners. If the reference to the service is removed without removing all listeners beforehand, open subscriptions will stay around forever. To avoid that, remove all listeners before removing the service.

Constructor Summary

Attributes Name and Description
caplin.streamlink.alerts.TriggerService()

Method Summary

Attributes Name and Description
void addListener( listener)

Adds a trigger listener that will be called back when triggers are added and removed.

void addTrigger( subject, condition, extraParams, listener)

Add a new trigger for the current user.

void disableTrigger( trigger, listener)

Disables a trigger in the system.

void enableTrigger( trigger, listener)

Enables a trigger from in system.

void removeListener( listener)

Removes a previously added trigger listener, callbacks to this listener will be stopped.

void removeTrigger( trigger, listener)

Removes a trigger from the system.

Constructor Detail

caplin.streamlink.alerts.TriggerService()

Method Detail

void addListener( listener)

Adds a trigger listener that will be called back when triggers are added and removed.

Parameters
listener - The TriggerListener to be added.

void addTrigger( subject, condition, extraParams, listener)

Add a new trigger for the current user.

Parameters
subject the rttp subject of this trigger.
condition the trigger condition, for more details on the format of the condition string, please see the StreamLink Overview document.
extraParams a map of extra parameters to be added to the trigger.
listener a ResultListener that will be called back to notify the user code of the result of this operation.
Returns
the trigger that has been created.

void disableTrigger( trigger, listener)

Disables a trigger in the system.

Parameters
trigger the Trigger that should be Disabled.
listener a ResultListener that will be called back to notify the user code of the result of this operation.

void enableTrigger( trigger, listener)

Enables a trigger from in system.

Parameters
trigger the Trigger that should be enabled.
listener a ResultListener that will be called back to notify the user code of the result of this operation.

void removeListener( listener)

Removes a previously added trigger listener, callbacks to this listener will be stopped.

Parameters
listener - The TriggerListener to be removed.

void removeTrigger( trigger, listener)

Removes a trigger from the system.

Parameters
trigger the Trigger that should be removed.
listener a ResultListener that will be called back to notify the user code of the result of this operation.