ecologylab.services.distributed.server.varieties
Class KmlServer

java.lang.Object
  extended by ecologylab.generic.Debug
      extended by ecologylab.services.distributed.impl.NIOServerBase
          extended by ecologylab.services.distributed.server.DoubleThreadedNIOServer
              extended by ecologylab.services.distributed.server.varieties.HttpGetServer
                  extended by ecologylab.services.distributed.server.varieties.KmlServer
All Implemented Interfaces:
StartAndStoppable, NetworkingConstants, ServerConstants, SessionObjects, Shutdownable, NIOServerFrontend, java.lang.Runnable

public class KmlServer
extends HttpGetServer

Author:
Zach

Field Summary
static java.lang.Class[] KML_MESSAGE_CLASSES
           
 
Fields inherited from class ecologylab.services.distributed.server.DoubleThreadedNIOServer
maxPacketSize
 
Fields inherited from class ecologylab.services.distributed.impl.NIOServerBase
registry, translationSpace
 
Fields inherited from interface ecologylab.services.distributed.common.ServerConstants
GARBAGE_CONNECTION_CLEANUP_TIMEOUT, MAX_CONNECTIONS, MAXIMUM_TRANSMISSION_ERRORS
 
Fields inherited from interface ecologylab.services.distributed.common.NetworkingConstants
CHARACTER_ENCODING, CONTENT_LENGTH_STRING, CONTENT_LENGTH_STRING_LENGTH, ENCODER, HTTP_HEADER_LINE_DELIMITER, HTTP_HEADER_TERMINATOR, MAX_HTTP_HEADER_LENGTH, MAX_PACKET_SIZE_BYTES, MAX_PACKET_SIZE_CHARACTERS, UNIQUE_IDENTIFIER_STRING
 
Fields inherited from interface ecologylab.services.distributed.common.SessionObjects
BROWSER_SERVICES_CLIENT, BROWSER_SERVICES_TRANSLATIONS, LOGGING, MAIN_SHUTDOWNABLE, MAIN_START_AND_STOPPABLE, TOP_LEVEL
 
Constructor Summary
KmlServer(int portNumber, java.net.InetAddress[] inetAddresses, TranslationSpace requestTranslationSpace, Scope objectRegistry, int idleConnectionTimeout, int maxPacketSize, Kml kmlData)
           
KmlServer(int portNumber, java.net.InetAddress inetAddress, TranslationSpace requestTranslationSpace, Scope objectRegistry, int idleConnectionTimeout, int maxPacketSize, Kml kmlData)
           
 
Method Summary
protected  AbstractClientManager generateContextManager(java.lang.Object token, java.nio.channels.SelectionKey sk, TranslationSpace translationSpaceIn, Scope registryIn)
          Hook method to allow changing the ContextManager to enable specific extra functionality.
static void main(java.lang.String[] args)
           
 
Methods inherited from class ecologylab.services.distributed.server.DoubleThreadedNIOServer
addressToAddresses, getInstance, getInstance, invalidate, isRunning, processRead, restoreContextManagerFromSessionId, run, shutdown, start, stop
 
Methods inherited from class ecologylab.services.distributed.impl.NIOServerBase
composeTranslations, composeTranslations, generateBackend, getBackend, getRegistry, getTranslationSpace
 
Methods inherited from class ecologylab.generic.Debug
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

KML_MESSAGE_CLASSES

public static final java.lang.Class[] KML_MESSAGE_CLASSES
Constructor Detail

KmlServer

public KmlServer(int portNumber,
                 java.net.InetAddress[] inetAddresses,
                 TranslationSpace requestTranslationSpace,
                 Scope objectRegistry,
                 int idleConnectionTimeout,
                 int maxPacketSize,
                 Kml kmlData)
          throws java.io.IOException,
                 java.net.BindException
Parameters:
portNumber -
inetAddresses -
requestTranslationSpace -
objectRegistry -
idleConnectionTimeout -
maxPacketSize -
kmlData - the singleton Kml object that will be sent when Google Earth requests KML. This object can be modified by other parts of the application to change what information is displayed in Google Earth.
Throws:
java.io.IOException
java.net.BindException

KmlServer

public KmlServer(int portNumber,
                 java.net.InetAddress inetAddress,
                 TranslationSpace requestTranslationSpace,
                 Scope objectRegistry,
                 int idleConnectionTimeout,
                 int maxPacketSize,
                 Kml kmlData)
          throws java.io.IOException,
                 java.net.BindException
Parameters:
portNumber -
inetAddress -
requestTranslationSpace -
objectRegistry -
idleConnectionTimeout -
maxPacketSize -
Throws:
java.io.IOException
java.net.BindException
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.net.BindException,
                        java.io.IOException,
                        XMLTranslationException
Parameters:
args -
Throws:
java.io.IOException
java.net.BindException
XMLTranslationException

generateContextManager

protected AbstractClientManager generateContextManager(java.lang.Object token,
                                                       java.nio.channels.SelectionKey sk,
                                                       TranslationSpace translationSpaceIn,
                                                       Scope registryIn)
Description copied from class: DoubleThreadedNIOServer
Hook method to allow changing the ContextManager to enable specific extra functionality.

Overrides:
generateContextManager in class HttpGetServer