All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class guinea.player.event.PlayerEventQueue

java.lang.Object
   |
   +----guinea.util.EventQueue
           |
           +----guinea.player.event.PlayerEventQueue

public class PlayerEventQueue
extends EventQueue
implements PlayerDiagnosticsListener, PlayerListener

Variable Index

· diagnosticsListeners
Listeners that are interested in player diagnostics events.
· playerListeners
Listeners that are interested in player events.

Constructor Index

· PlayerEventQueue()
Construct a new player event queue with no name.
· PlayerEventQueue(EventQueue)
Construct a new event queue by sharing the event queue and thread of another event queue.
· PlayerEventQueue(String)
Construct a new player event queue with given name for the dispatcher thread.

Method Index

· addPlayerDiagnosticsListener(PlayerDiagnosticsListener)
Add a player diagnostics listener.
· addPlayerListener(PlayerListener)
Add a player listener.
· hasDiagnosticsListeners()
Are there player diagnostics listeners registered?
· hasListeners()
Is there any more event listeners.
· hasPlayerListeners()
Are there player listeners registered?
· playerFrameDrop(FrameDropEvent)
Send a framedrop event to all listeners.
· playerLogMessage(LogMessageEvent)
Send a player log message event to all listeners.
· playerStarted(PlayerEvent)
Send a player event to all player listeners.
· playerStopped(PlayerEvent)
Send a player event to all player listeners.
· processEvent(EventObject)
Process the event and send it to all listeners.
· processFrameDropEvent(FrameDropEvent)
Process the frame-drop event and send it to all player diagnostics listeners.
· processLogMessageEvent(LogMessageEvent)
Process the log message event and send it to all player diagnostics listeners.
· processPlayerEvent(PlayerEvent)
Process the player event and send it to all player listeners.
· removePlayerDiagnosticsListener(PlayerDiagnosticsListener)
Remove a player diagnostics listener.
· removePlayerListener(PlayerListener)
Remove a player listener.

Variables

· diagnosticsListeners
 protected PlayerDiagnosticsListener diagnosticsListeners
Listeners that are interested in player diagnostics events.

· playerListeners
 protected PlayerListener playerListeners
Listeners that are interested in player events.

Constructors

· PlayerEventQueue
 public PlayerEventQueue()
Construct a new player event queue with no name.

· PlayerEventQueue
 public PlayerEventQueue(String name)
Construct a new player event queue with given name for the dispatcher thread.

Parameters:
name - the name for the dispatcher thread.
· PlayerEventQueue
 public PlayerEventQueue(EventQueue share)
Construct a new event queue by sharing the event queue and thread of another event queue.

Parameters:
share - the other event queue whose queue to share.

Methods

· hasDiagnosticsListeners
 public synchronized boolean hasDiagnosticsListeners()
Are there player diagnostics listeners registered?

Returns:
true if there are diagnostics listeners registered.
See Also:
hasListeners
· hasPlayerListeners
 public synchronized boolean hasPlayerListeners()
Are there player listeners registered?

Returns:
true if there are player listeners registered.
See Also:
hasListeners
· hasListeners
 public synchronized boolean hasListeners()
Is there any more event listeners. Will return false if there are no diagnostics or player listeners.

Returns:
true if there are listeners registered.
Overrides:
hasListeners in class EventQueue
See Also:
hasDiagnosticsListeners, hasPlayerListeners
· playerFrameDrop
 public synchronized void playerFrameDrop(FrameDropEvent e)
Send a framedrop event to all listeners. Invokes the playerFrameDrop(e) on all listeners.

Parameters:
e - an event that contains information about the frame drop.
· playerLogMessage
 public synchronized void playerLogMessage(LogMessageEvent e)
Send a player log message event to all listeners. Invokes the playerLogMessage(e) on all listeners.

Parameters:
e - an event that contains information about the message.
· playerStarted
 public synchronized void playerStarted(PlayerEvent e)
Send a player event to all player listeners. Invokes the playerStarted(e) on all listeners.

Parameters:
e - a player event.
· playerStopped
 public synchronized void playerStopped(PlayerEvent e)
Send a player event to all player listeners. Invokes the playerStopped(e) on all listeners.

Parameters:
e - a player event.
· addPlayerDiagnosticsListener
 public synchronized void addPlayerDiagnosticsListener(PlayerDiagnosticsListener l)
Add a player diagnostics listener.

Parameters:
l - a listener.
· removePlayerDiagnosticsListener
 public synchronized void removePlayerDiagnosticsListener(PlayerDiagnosticsListener l)
Remove a player diagnostics listener.

Parameters:
l - a listener.
· addPlayerListener
 public synchronized void addPlayerListener(PlayerListener l)
Add a player listener.

Parameters:
l - a listener.
· removePlayerListener
 public synchronized void removePlayerListener(PlayerListener l)
Remove a player listener.

Parameters:
l - a listener.
· processEvent
 protected void processEvent(EventObject event)
Process the event and send it to all listeners. This is called by the dispatcher thread. This method will recognize the LogMessageEvent, FrameDropEvent and PlayerEvent event classes and calls the corresponding process*Event methods to process them. Unknown events are passed to the super-class.

Parameters:
event - the event to be sent to listeners.
Overrides:
processEvent in class EventQueue
· processLogMessageEvent
 protected void processLogMessageEvent(LogMessageEvent e)
Process the log message event and send it to all player diagnostics listeners.

Parameters:
event - the event to be sent to diagnostics listeners.
· processFrameDropEvent
 protected void processFrameDropEvent(FrameDropEvent e)
Process the frame-drop event and send it to all player diagnostics listeners.

Parameters:
event - the event to be sent to diagnostics listeners.
· processPlayerEvent
 protected void processPlayerEvent(PlayerEvent e)
Process the player event and send it to all player listeners.

Parameters:
event - the event to be sent to player listeners.

All Packages  Class Hierarchy  This Package  Previous  Next  Index