Java Doc for ABBBasicPlayer.java in  » 6.0-JDK-Modules » j2me » com » sun » mmedia » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » com.sun.mmedia 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.mmedia.ABBBasicPlayer

All known Subclasses:   com.sun.mmedia.QSoundABBToneSequencePlayer,
ABBBasicPlayer
abstract public class ABBBasicPlayer implements Player(Code)
BasicPlayer provides basic implementation for the Player methods. Many of the methods call do to do the actual work that can be overridden by subclasses.


Field Summary
final public static  intAUDIO_MIDI
    
final public static  intAUDIO_NONE
    
final public static  intAUDIO_PCM
    
 booleanEOM
     the flag to indicate whether the Player is currently paused at EOM.
 PlayerEventQueueeventQueue
     Asynchronous event mechanism.
 inteventQueueSize
    
 ObjectevtLock
    
final protected static  StringfpcName
    
final protected static  StringguiName
    
 Vectorlisteners
    
 booleanlistenersModified
     flag shows that "listeners" have been modified while player is executing callbacks from "listeners".
 booleanloopAfterEOM
     the flag to indicate looping after EOM.
 intloopCountSetloopCount
    
final protected static  StringmdcName
    
final protected static  StringmicName
    
protected  intpID
    
final protected static  StringpicName
    
final protected static  StringpkgName
    
final protected static  StringracName
    
final protected static  StringrecName
    
final protected static  StringrtspName
     This one is not among public JSR135 controls, seems that this is used only for RTSP PLayer.
 InputStreamsource
    
public  intstate
    
final protected static  StringstcName
    
final protected static  StringtecName
    
final protected static  StringtocName
    
final protected static  StringvicName
    
final protected static  StringvocName
    

Constructor Summary
public  ABBBasicPlayer()
    
protected  ABBBasicPlayer(String[] n, int[] p)
    

Method Summary
public  voidaddPlayerListener(PlayerListener playerListener)
    
final protected  voidcheckPermissions()
    
final protected  voidchkClosed(boolean unrealized)
     Check to see if the Player is closed.
public synchronized  voidclose()
    
public synchronized  voiddeallocate()
    
abstract protected  voiddoClose()
     Subclasses need to implement this to close the Player.
abstract protected  voiddoDeallocate()
     Subclasses need to implement this to deallocate the Player.
synchronized  voiddoFinishLoopIteration()
    
abstract protected  ControldoGetControl(String type)
     The worker method to actually obtain the control.
Parameters:
  type - the class name of the Control.
abstract protected  longdoGetDuration()
     Subclasses need to implement this to get the duration of the Player.
abstract protected  longdoGetMediaTime()
    
synchronized  voiddoNextLoopIteration()
    
protected  voiddoPostStart()
     Subclasses can override this method to do the actual starting of worker threads.
abstract protected  voiddoPrefetch()
     Subclasses need to implement this to prefetch the Player.
abstract protected  voiddoRealize()
     Subclasses need to implement this to realize the Player.
public  intdoSetLevel(int ll)
    
protected  voiddoSetLoopCount(int count)
    
abstract protected  longdoSetMediaTime(long now)
     Subclasses need to implement this to set the media time of the Player.
abstract protected  booleandoStart()
     Subclasses need to implement this start the Player.
abstract protected  voiddoStop()
     Subclasses need to implement this to realize the Player.
public static  ABBBasicPlayerget(int pid)
    
public  intgetAudioType()
    
public  StringgetContentType()
    
final public  ControlgetControl(String type)
     Gets the Control that supports the specified class or interface.
final public  Control[]getControls()
    
public  longgetDuration()
    
public  longgetMediaTime()
    
public  ObjectgetOutput()
    
public  intgetState()
    
public  booleaninitFromURL(String encodings)
     Initializes Player by Media Encodings obtained from URI and parsed.
final  voidnotifyListeners(String message, Object obj)
    
public static  voidnotifyPauseListener(String msg)
    
public static  voidpauseAll()
     Pauses and deallocates all media players. After this call all players are either in realized or unrealized state.
public static  voidpauseStateEntered(MIDletPauseListener listener, boolean paused)
    
public synchronized  voidprefetch()
    
public synchronized  voidrealize()
    
public  voidremovePlayerListener(PlayerListener playerListener)
    
public static  voidresumeAll()
     Resumes all media players' activities.
public  voidsendEvent(String evtName, Object evtData)
    
public synchronized  voidsetLoopCount(int count)
    
public static  voidsetMIDletPauseListener(MIDletPauseListener listener)
     Sets the listener for media activity notifications.
public synchronized  longsetMediaTime(long now)
    
public  voidsetOutput(Object output)
    
public  voidsetSource(InputStream source)
    
public synchronized  voidstart()
    
public synchronized  voidstop()
    

Field Detail
AUDIO_MIDI
final public static int AUDIO_MIDI(Code)



AUDIO_NONE
final public static int AUDIO_NONE(Code)



AUDIO_PCM
final public static int AUDIO_PCM(Code)



EOM
boolean EOM(Code)
the flag to indicate whether the Player is currently paused at EOM. If true, the Player will seek back to the beginning when restarted.



eventQueue
PlayerEventQueue eventQueue(Code)
Asynchronous event mechanism.



eventQueueSize
int eventQueueSize(Code)
the default size of the event queue can be overridden by descendants



evtLock
Object evtLock(Code)
event queue lock obj



fpcName
final protected static String fpcName(Code)
Description of the Field



guiName
final protected static String guiName(Code)
Description of the Field



listeners
Vector listeners(Code)
this player's playerlisteners



listenersModified
boolean listenersModified(Code)
flag shows that "listeners" have been modified while player is executing callbacks from "listeners".



loopAfterEOM
boolean loopAfterEOM(Code)
the flag to indicate looping after EOM.



loopCountSetloopCount
int loopCountSetloopCount(Code)
the loopCount of this player



mdcName
final protected static String mdcName(Code)
Description of the Field



micName
final protected static String micName(Code)
Description of the Field



pID
protected int pID(Code)
player ID of this player



picName
final protected static String picName(Code)
Description of the Field



pkgName
final protected static String pkgName(Code)
Control package name



racName
final protected static String racName(Code)
Description of the Field



recName
final protected static String recName(Code)
Description of the Field



rtspName
final protected static String rtspName(Code)
This one is not among public JSR135 controls, seems that this is used only for RTSP PLayer. But its participation in "search-by-name" slows down all players that use this array for "getControls()".



source
InputStream source(Code)



state
public int state(Code)
the state of this player



stcName
final protected static String stcName(Code)
Description of the Field



tecName
final protected static String tecName(Code)
Description of the Field



tocName
final protected static String tocName(Code)
Description of the Field



vicName
final protected static String vicName(Code)
Description of the Field



vocName
final protected static String vocName(Code)
Description of the Field




Constructor Detail
ABBBasicPlayer
public ABBBasicPlayer()(Code)
Constructor for the ABBBasicPlayer object



ABBBasicPlayer
protected ABBBasicPlayer(String[] n, int[] p)(Code)




Method Detail
addPlayerListener
public void addPlayerListener(PlayerListener playerListener)(Code)



checkPermissions
final protected void checkPermissions() throws SecurityException(Code)
Checks if user application has all permissions needed to access player



chkClosed
final protected void chkClosed(boolean unrealized)(Code)
Check to see if the Player is closed. If the unrealized boolean flag is true, check also to see if the Player is UNREALIZED.
Parameters:
  unrealized - Description of the Parameter



close
public synchronized void close()(Code)



deallocate
public synchronized void deallocate()(Code)



doClose
abstract protected void doClose()(Code)
Subclasses need to implement this to close the Player.



doDeallocate
abstract protected void doDeallocate()(Code)
Subclasses need to implement this to deallocate the Player.



doFinishLoopIteration
synchronized void doFinishLoopIteration()(Code)



doGetControl
abstract protected Control doGetControl(String type)(Code)
The worker method to actually obtain the control.
Parameters:
  type - the class name of the Control. Control for the class or interfacename.



doGetDuration
abstract protected long doGetDuration()(Code)
Subclasses need to implement this to get the duration of the Player. Description of the Return Value



doGetMediaTime
abstract protected long doGetMediaTime()(Code)
Subclasses need to implement this to get the media time of the Player Description of the Return Value



doNextLoopIteration
synchronized void doNextLoopIteration()(Code)
Description of the Method



doPostStart
protected void doPostStart()(Code)
Subclasses can override this method to do the actual starting of worker threads.



doPrefetch
abstract protected void doPrefetch() throws MediaException(Code)
Subclasses need to implement this to prefetch the Player.
exception:
  MediaException - Description of the Exception



doRealize
abstract protected void doRealize() throws MediaException(Code)
Subclasses need to implement this to realize the Player.
exception:
  MediaException - Description of the Exception



doSetLevel
public int doSetLevel(int ll)(Code)
Implementation method for VolumeControl
Parameters:
  ll - Description of the Parameter Description of the Return Value



doSetLoopCount
protected void doSetLoopCount(int count)(Code)
Description of the Method
Parameters:
  count - Description of the Parameter



doSetMediaTime
abstract protected long doSetMediaTime(long now) throws MediaException(Code)
Subclasses need to implement this to set the media time of the Player.
Parameters:
  now - Description of the Parameter Description of the Return Value
exception:
  MediaException - Description of the Exception



doStart
abstract protected boolean doStart()(Code)
Subclasses need to implement this start the Player. Description of the Return Value



doStop
abstract protected void doStop() throws MediaException(Code)
Subclasses need to implement this to realize the Player.
exception:
  MediaException - Description of the Exception



get
public static ABBBasicPlayer get(int pid)(Code)
For global PlayerID management
Parameters:
  pid - Description of the Parameter Description of the Return Value



getAudioType
public int getAudioType()(Code)



getContentType
public String getContentType()(Code)



getControl
final public Control getControl(String type)(Code)
Gets the Control that supports the specified class or interface. The full class or interface name should be specified. Null is returned if the Control is not supported.
Parameters:
  type - Description of the Parameter Control for the class or interfacename.



getControls
final public Control[] getControls()(Code)
Gets the controls attribute of the BasicPlayer object The controls value



getDuration
public long getDuration()(Code)



getMediaTime
public long getMediaTime()(Code)



getOutput
public Object getOutput()(Code)



getState
public int getState()(Code)



initFromURL
public boolean initFromURL(String encodings)(Code)
Initializes Player by Media Encodings obtained from URI and parsed. To be called by Manager when new player (from URI) is being created.
Parameters:
  encodings - media encodings in form "key=value", separated by '&'.



notifyListeners
final void notifyListeners(String message, Object obj)(Code)



notifyPauseListener
public static void notifyPauseListener(String msg)(Code)



pauseAll
public static void pauseAll()(Code)
Pauses and deallocates all media players. After this call all players are either in realized or unrealized state. Resources are being released during deallocation.



pauseStateEntered
public static void pauseStateEntered(MIDletPauseListener listener, boolean paused)(Code)
Informs the BasicPlayer that the VM has been paused if paused is set to true - or resumed if paused is set to false



prefetch
public synchronized void prefetch() throws MediaException(Code)



realize
public synchronized void realize() throws MediaException(Code)



removePlayerListener
public void removePlayerListener(PlayerListener playerListener)(Code)



resumeAll
public static void resumeAll()(Code)
Resumes all media players' activities. Players that were in STARTED state when pause was called will resume playing at the media time they were stopped and deallocated.



sendEvent
public void sendEvent(String evtName, Object evtData)(Code)
Description of the Method
Parameters:
  evtName - Description of the Parameter
Parameters:
  evtData - Description of the Parameter



setLoopCount
public synchronized void setLoopCount(int count)(Code)



setMIDletPauseListener
public static void setMIDletPauseListener(MIDletPauseListener listener)(Code)
Sets the listener for media activity notifications. This interface can only be set once and shall only be used by MIDletState.



setMediaTime
public synchronized long setMediaTime(long now) throws MediaException(Code)



setOutput
public void setOutput(Object output)(Code)



setSource
public void setSource(InputStream source) throws IOException, MediaException(Code)



start
public synchronized void start() throws MediaException(Code)



stop
public synchronized void stop() throws MediaException(Code)



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.