at.tuwien.ifs.somtoolbox.apps.viewer.controls.psomserver.httphandler
Class PocketSOMConfigProvider

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.apps.viewer.controls.psomserver.httphandler.PocketSOMConfigProvider
All Implemented Interfaces:
com.sun.net.httpserver.HttpHandler

public class PocketSOMConfigProvider
extends Object
implements com.sun.net.httpserver.HttpHandler

The ConfigurationProvider provides sends all PocketSOM-Files via http: (psom, jpeg and list)

Author:
Jakob Frank

Field Summary
private  int connectorEndpointPort
           
private static boolean DEBUG
           
protected static String IMG
           
private  Logger log
           
private static String LOG_SEP
           
protected static String MAPPING
           
private  String musicContext
           
private static String NL
           
protected static String PSOM
           
private  CommonSOMViewerStateData state
           
 
Constructor Summary
PocketSOMConfigProvider(CommonSOMViewerStateData state, int port, String mapContentContext)
           
 
Method Summary
private  String getClient(com.sun.net.httpserver.HttpExchange t)
           
 void handle(com.sun.net.httpserver.HttpExchange t)
           
private  void printRequest(com.sun.net.httpserver.HttpExchange t)
           
private  void sendMapping(com.sun.net.httpserver.HttpExchange t)
           
private  void sendPsomFile(com.sun.net.httpserver.HttpExchange t)
           
private  void sendVisualisation(com.sun.net.httpserver.HttpExchange t)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PSOM

protected static final String PSOM
See Also:
Constant Field Values

IMG

protected static final String IMG
See Also:
Constant Field Values

MAPPING

protected static final String MAPPING
See Also:
Constant Field Values

NL

private static final String NL
See Also:
Constant Field Values

DEBUG

private static final boolean DEBUG
See Also:
Constant Field Values

LOG_SEP

private static final String LOG_SEP
See Also:
Constant Field Values

log

private final Logger log

connectorEndpointPort

private final int connectorEndpointPort

musicContext

private final String musicContext

state

private final CommonSOMViewerStateData state
Constructor Detail

PocketSOMConfigProvider

public PocketSOMConfigProvider(CommonSOMViewerStateData state,
                               int port,
                               String mapContentContext)
Method Detail

handle

public void handle(com.sun.net.httpserver.HttpExchange t)
            throws IOException
Specified by:
handle in interface com.sun.net.httpserver.HttpHandler
Throws:
IOException

sendMapping

private void sendMapping(com.sun.net.httpserver.HttpExchange t)
                  throws IOException
Throws:
IOException

sendVisualisation

private void sendVisualisation(com.sun.net.httpserver.HttpExchange t)
                        throws IOException
Throws:
IOException

getClient

private String getClient(com.sun.net.httpserver.HttpExchange t)

sendPsomFile

private void sendPsomFile(com.sun.net.httpserver.HttpExchange t)
                   throws IOException
Throws:
IOException

printRequest

private void printRequest(com.sun.net.httpserver.HttpExchange t)
                   throws IOException
Throws:
IOException