|
JSR-234 1.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PriorityControl
Priority
Control
is an interface for manipulating
the priority of a Player
among other Player
s.
This interface allows prioritizing the playback of a Player
by
setting a priority level between 0 and 100. 100 being the highest priority, 50 the default level and zero the
lowest priority. This interface can be used for automatic handling of essential
sounds and experience-enhancing sounds inside the java virtual machine.
Priority 100-51: High priority, should be used for Player
s that are
more vital for the user interface than the default priority level Player
s.
Priority 50: The default middle priority, if all Player
s have this
priority level the functionality is identical to MMAPI 1.1.
Priority 49-1: Low priority, should be used for Player
s that are
not as important for the user interface as the default priority level Player
s.
Priority 0: The lowest priority. These Player
s are dropped if there is any risk that they would hinder
other Player
s.
For Player
s where the priority level is not set, the default
priority 50 is used.
When a Player
makes a transition from REALIZED to PREFETCHED or
STARTED and there are no resources available to perform the
transition then the following happens:
Player
doing the transition has a higher priority than some Player
holding a
resource needed to perform the transition then
Player
having the lowest priority among the Player
s holding the resource
will send DEVICE_UNAVAILABLE event to its PlayerListener
and do state
transition from STARTED or PREFETCHED to REALIZED.
Player
doing the transition performs the transition normally.
Player
doing the transition has a lower or equal priority than the priorities of all the Player
s
holding the needed resource then transition cannot be performed.
Method Summary | |
---|---|
int |
getPriority()
Gets the current priority. |
void |
setPriority(int level)
Sets the new priority. |
Method Detail |
---|
int getPriority()
void setPriority(int level)
level
- new priority
java.lang.IllegalArgumentException
- if the given level < 0 or the given level > 100
|
JSR-234 1.1 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |