public class CommandResource extends Resource<String>
| Modifier and Type | Field and Description |
|---|---|
static String |
CHANGE_PLAYBACK |
static String |
CHANGE_VOLUME |
static String |
JUMP |
static String |
NEXT |
static String |
PAUSE |
static String |
PLAY |
static String |
PREVIOUS |
static String |
ResourceID |
static String |
SELECT_TRACK |
static String |
STOP |
| Modifier and Type | Method and Description |
|---|---|
static Optional<CommandResource> |
createCommandResource(Identification provider,
String command,
Capabilities capabilities,
Context context)
creates a new Resource.
|
static boolean |
verify(String command,
Capabilities capabilities)
verifies tha the command is legal and able to be executed
|
static boolean |
verifyCapabilities(String command,
Capabilities capabilities)
verifies that the player is capable of handling the command
|
static boolean |
verifyCommand(String command)
verifies that an command is not malformed
|
getConsumer, getID, getProvider, getResource, getResourceID, hasProvider, setConsumer, setProvider, setResource, toList, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisOwnerpublic static final String ResourceID
public static final String PLAY
public static final String PAUSE
public static final String STOP
public static final String SELECT_TRACK
public static final String NEXT
public static final String PREVIOUS
public static final String JUMP
public static final String CHANGE_PLAYBACK
public static final String CHANGE_VOLUME
public static Optional<CommandResource> createCommandResource(Identification provider, String command, Capabilities capabilities, Context context)
provider - the Provider of the Resourcecommand - the resourcecapabilities - the capabilities of the playercontext - used for loggingpublic static boolean verifyCommand(String command)
command - the Commandpublic static boolean verifyCapabilities(String command, Capabilities capabilities)
command - the commandcapabilities - the capabilitiespublic static boolean verify(String command, Capabilities capabilities)
command - the commandcapabilities - the capabilitiesCopyright © 2016. All rights reserved.