org.qtunes.web.spi.sun
Class SunServer

java.lang.Object
  extended by org.qtunes.web.spi.sun.SunServer
All Implemented Interfaces:
Service, WebService

public class SunServer
extends java.lang.Object
implements WebService


Constructor Summary
SunServer()
           
 
Method Summary
 java.net.InetSocketAddress getAddress()
           
 ServiceContext getContext()
          Return the ServiceContext that was passed into Service.startService(org.qtunes.core.ServiceContext)
 java.lang.String hasHandler(java.lang.String path)
           
 java.util.Map<java.lang.String,java.lang.Object> reportState()
          Return a Map describing the state of this Service, for serialization back to any client that needs to know (eg webplayer) - so values should be serializable objects, eg Lists, Maps or simple objects.
 void setHandler(java.lang.String prefix, WebHandler handler)
           
 void startService(ServiceContext context)
          Start the Service
 void stopService(ServiceContext context)
          Stop the Service
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SunServer

public SunServer()
Method Detail

setHandler

public void setHandler(java.lang.String prefix,
                       WebHandler handler)
Specified by:
setHandler in interface WebService

getAddress

public java.net.InetSocketAddress getAddress()
Specified by:
getAddress in interface WebService

hasHandler

public java.lang.String hasHandler(java.lang.String path)
Specified by:
hasHandler in interface WebService

getContext

public ServiceContext getContext()
Description copied from interface: Service
Return the ServiceContext that was passed into Service.startService(org.qtunes.core.ServiceContext)

Specified by:
getContext in interface Service

startService

public void startService(ServiceContext context)
Description copied from interface: Service
Start the Service

Specified by:
startService in interface Service
Parameters:
context - the ServiceContext for this Service

stopService

public void stopService(ServiceContext context)
Description copied from interface: Service
Stop the Service

Specified by:
stopService in interface Service
Parameters:
context - the ServiceContext for this Service (same as was passed into start)

reportState

public java.util.Map<java.lang.String,java.lang.Object> reportState()
Description copied from interface: Service
Return a Map describing the state of this Service, for serialization back to any client that needs to know (eg webplayer) - so values should be serializable objects, eg Lists, Maps or simple objects. If no useful state, return null.

Specified by:
reportState in interface Service