public class MusicUsageResource extends Resource<Boolean>
It is mostly used for non-permanent Music-Usage which blocks the Event in the Output lifecycle.
For example if you are an alarm you can add this resource to an Event and it will play the alarm sound, blocking
the execution for other outputPlugins.
Constructor and Description |
---|
MusicUsageResource(Identification provider,
Boolean permanent)
creates a new Resource.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isPermanent(EventModel eventModel)
gets whether the request is permanent (=permanent resource is available and true)
|
static boolean |
isPermanent(ResourceModel resourceModel)
returns true if the resource is true, otherwise returns false
|
getConsumer, getID, getProvider, getResource, getResourceID, hasProvider, setConsumer, setProvider, setResource, toList, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isOwner
public static final String ID
public MusicUsageResource(Identification provider, Boolean permanent)
provider
- the Provider of the Resourcepermanent
- true if permanent, false if notpublic static boolean isPermanent(EventModel eventModel)
eventModel
- the EventModelpublic static boolean isPermanent(ResourceModel resourceModel)
resourceModel
- the resourceModelCopyright © 2016. All rights reserved.