org.musicontroller.streaming
Class StreamMaster

java.lang.Object
  extended by org.musicontroller.streaming.StreamMaster

public class StreamMaster
extends java.lang.Object

The StreamMaster keeps track of all userIds and DJs. It maintains the relation between DJ's and Users. GUI sessions may come and go, but the streammaster maintains a one-to-one relation between a user and a DJ. The UI uses this class to redirect requests to the right DJ. The StreamService uses this class to get the DJ from upon initialization.

Author:
Arjan Verstoep

Constructor Summary
StreamMaster()
           
 
Method Summary
static DJ getDJByUser(long userid)
          Retrieve the DJ belonging to a user.
 DJFactory getDjFactory()
          Getter for the DJ factory.
static java.util.Collection<java.lang.Long> getUserIDs()
           
 void setDjFactory(DJFactory factory)
          Setter for the DJ factory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StreamMaster

public StreamMaster()
Method Detail

getDJByUser

public static DJ getDJByUser(long userid)
Retrieve the DJ belonging to a user. Returns the DJ in the DJ map or creates a new DJ if the map does not contain a DJ for the user id.

Parameters:
userid - The id of the user.
Returns:
The DJ of that user.

setDjFactory

public void setDjFactory(DJFactory factory)
Setter for the DJ factory.

Parameters:
factory - The DF factory.

getDjFactory

public DJFactory getDjFactory()
Getter for the DJ factory.

Returns:
The DJ factory.

getUserIDs

public static java.util.Collection<java.lang.Long> getUserIDs()


Copyright © 2010 A.J.V.. All Rights Reserved.