All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ejmf.toolkit.multiplayer.MultiPlayerControl

java.lang.Object
   |
   +----ejmf.toolkit.multiplayer.MultiPlayerControl

public abstract class MultiPlayerControl
extends Object
implements ControllerListener
The MultiPlayerControl inteface defines a control stategy pattern for use with a MultiPlayer client. The interface defines the following methods: An implementation of MultiPlayerControl is responsible for maintaining a TrackList upon which all the methods operate. This is typically passed to the object at construction time.

Implementations of a MultiPlayerControl's methods should not assume anything about the state of a Controller. Any implementation to ensure the Controller is in the appropriate state for performng an operation.

The update takes a TrackList as an argument and provides a mechanism of providing a new TrackList to the control stratgey.

See Also:
MultiPlayer, TrackList, DefaultMultiPlayerControl, MultiPlayerTimerControl, SyncStartControl

Constructor Index

 o MultiPlayerControl(TrackList)
Create a MultiPlayer from a list of Tracks.

Method Index

 o close()
Deallocate and close all Players
 o controllerUpdate(ControllerEvent)
Call out to controllerUpdateHook and force subclass to provide whatever control they need.
 o controllerUpdateHook(ControllerEvent)
This method provides subclass action in response to a ControllerEvent.
 o getTrackList()
Get the TrackList associated with this MultiPlayerControl.
 o init()
Initialize the MultiPlayerControl
 o prefetchPlayers()
Prefetch all Players under control of MultiPlayer
 o restart()
Restart the MultiPlayer
 o rewind()
Rewind the MultiPlayer.
 o setTrackList(TrackList)
Allow subclasses to set TrackList
 o start()
Start the MultiPlayerControl.
 o stop()
Stop the MultiPlayerControl.
 o update(TrackList)
Update the MultiPlayerControl.

Constructors

 o MultiPlayerControl
 public MultiPlayerControl(TrackList tracks)
Create a MultiPlayer from a list of Tracks.

Methods

 o close
 public abstract void close()
Deallocate and close all Players

 o init
 public abstract boolean init()
Initialize the MultiPlayerControl

Returns:
true if initialization was successful, otherwise return false.
 o restart
 public abstract void restart()
Restart the MultiPlayer

 o rewind
 public abstract void rewind()
Rewind the MultiPlayer.

 o start
 public abstract void start()
Start the MultiPlayerControl. Starts all the Players in the TrackList.

 o stop
 public abstract void stop()
Stop the MultiPlayerControl. Stops all Players in the TrackList.

 o update
 public abstract boolean update(TrackList tracks)
Update the MultiPlayerControl. This method is typically called when the TrackList is changed in such a way as to impact the control strategy, ie. an addition or deletion of a Track.

Parameters:
tracks - a ejmf.toolkit.multiplayer.TrackList
Returns:
true if update was successful, otherwise return false.
 o controllerUpdateHook
 protected abstract void controllerUpdateHook(ControllerEvent event)
This method provides subclass action in response to a ControllerEvent. It is called by controllerUpdate.

 o getTrackList
 public TrackList getTrackList()
Get the TrackList associated with this MultiPlayerControl.

 o setTrackList
 protected void setTrackList(TrackList tracks)
Allow subclasses to set TrackList

 o prefetchPlayers
 protected boolean prefetchPlayers()
Prefetch all Players under control of MultiPlayer

 o controllerUpdate
 public void controllerUpdate(ControllerEvent event)
Call out to controllerUpdateHook and force subclass to provide whatever control they need.


All Packages  Class Hierarchy  This Package  Previous  Next  Index