org.qtunes.main
Class QTunes

java.lang.Object
  extended by org.qtunes.main.QTunes

public class QTunes
extends java.lang.Object

The main class. The qTunes server does very little on its own, but mainly handle the loading/saving of the configuration and state, and the starting and stopping of Service objects.


Field Summary
 java.util.List<ServiceContextImpl> contexts
           
 
Constructor Summary
QTunes()
          Create a new QTunes server
 
Method Summary
 void addListener(Listener listener)
           
 void addServiceContext(ServiceContextImpl context)
           
 void fireEvent(java.lang.String name, java.util.Map<?,?> eventprops)
           
 java.util.Iterator<ServiceContextImpl> getActiveServices()
           
 java.util.Date getServerBuildDate()
           
 java.lang.String getServerName()
          Return the name of the Server, as specified in the configuration
 java.util.Iterator<ServiceContextImpl> getServices()
           
 java.lang.String getSoftwareName()
          Return the name and version of the Software
 void loadConfiguration(java.io.File file)
          Load the configuration from the specified file
static void main(java.lang.String[] args)
           
 void quit()
          Deregister all Services and quit the Server
 void removeListener(Listener listener)
           
 void removeServiceContext(ServiceContextImpl context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

contexts

public java.util.List<ServiceContextImpl> contexts
Constructor Detail

QTunes

public QTunes()
Create a new QTunes server

Method Detail

getSoftwareName

public java.lang.String getSoftwareName()
Return the name and version of the Software


getServerName

public java.lang.String getServerName()
Return the name of the Server, as specified in the configuration


getServerBuildDate

public java.util.Date getServerBuildDate()

getServices

public java.util.Iterator<ServiceContextImpl> getServices()

getActiveServices

public java.util.Iterator<ServiceContextImpl> getActiveServices()

quit

public void quit()
Deregister all Services and quit the Server


loadConfiguration

public void loadConfiguration(java.io.File file)
                       throws java.io.IOException
Load the configuration from the specified file

Throws:
java.io.IOException

addServiceContext

public void addServiceContext(ServiceContextImpl context)

removeServiceContext

public void removeServiceContext(ServiceContextImpl context)

addListener

public void addListener(Listener listener)

removeListener

public void removeListener(Listener listener)

fireEvent

public void fireEvent(java.lang.String name,
                      java.util.Map<?,?> eventprops)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception