|
|||||||||
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:
If the Player
doing the transition has a higher priority than some Player
holding a
resource needed to perform the transition then
The 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.
The Player
doing the transition performs the transition normally.
If the 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
IllegalArgumentException
- if the given level < 0 or the given level > 100
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal