com.evolution.player.ui.musicplayer
Class MusicPlayerProvider

java.lang.Object
  extended by com.evolution.player.ui.musicplayer.MusicPlayerProvider

public abstract class MusicPlayerProvider
extends java.lang.Object

A music player provider can provide a music player for a given media info. A music player provider can be contributed through the com.evolution.player.ui.musicPlayerProvider extension point provided by the com.evolution.player.ui plugin.

It is expected that a MusicPlayerProvider does work together with a MediaInfoProvider.

Clients must implement.

Since:
0.6
See Also:
MusicPlayer, MediaInfoProvider

Constructor Summary
MusicPlayerProvider()
           
 
Method Summary
abstract  boolean canHandle(LocalMediaInfo info)
          True if this provider can create a music player which is able to play the given media.
abstract  MusicPlayer createPlayer(LocalMediaInfo info)
          Return a new instance of a music player which is able to play the given media.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MusicPlayerProvider

public MusicPlayerProvider()
Method Detail

canHandle

public abstract boolean canHandle(LocalMediaInfo info)
True if this provider can create a music player which is able to play the given media.

Parameters:
info - the media to handle
Returns:
true if and only if this provider can create a player for the given media

createPlayer

public abstract MusicPlayer createPlayer(LocalMediaInfo info)
Return a new instance of a music player which is able to play the given media. This is only called if canHandle(LocalMediaInfo) returns true for the same media.

Parameters:
info - the media to play
Returns:
the player for the given media