gistoolkit.server.mapservice
Class WebMapService

java.lang.Object
  extended bygistoolkit.server.mapservice.WebMapService
All Implemented Interfaces:
ServerHolder

public class WebMapService
extends java.lang.Object
implements ServerHolder

A class to implement the WebMapService 1.1.1 specification.


Field Summary
static java.lang.String DEFAULT_SERVICE_TAG
           
static java.lang.String EXTENDER_CLASS_TAG
           
static java.lang.String EXTENDER_NODE
           
static java.lang.String HOST_NAME_TAG
           
 java.lang.String myInitFileName
          Location of the initialization file.
static java.lang.String PORT_NUMBER
           
static java.lang.String WEB_MAP_SERVICE_NODE
           
 
Constructor Summary
WebMapService()
          Creates new WebMapService1_1_1
 
Method Summary
 void addExtensionService(ExtensionService inExtensionService)
          Add an extension service.
 void addResponseThread(ResponseThread inThread)
          Add a thread to the response thread vector.
 java.lang.String getDefaultServiceName()
          Get the name of the default service.
protected  ExtensionService getExtensionService(java.lang.String inServiceName)
          Get the extension service with the given name
 java.lang.String getHostName()
          Get the host name.
 java.lang.String getName()
          Get the name of the service.
 int getPort()
          Get the port on which this web maps service is listening.
protected  Server getServer()
          The response thread needs to get to the server in order to generate the image.
 boolean hasService(java.lang.String inName)
          checks if this web server has the given service as one of it's available services.
 void init(java.lang.String inInitFile)
          Initialize the service.
 void listen()
           
 void log(java.lang.String inString)
          Log the string to the log file.
 void log(java.lang.Throwable inT)
          Log entries to the log files.
static void main(java.lang.String[] inArgs)
          Main entry point for the 1_1_1 web map service.
 void removeExtensionService(ExtensionService inExtensionService)
          Remove an extension service.
 void removeResponseThread(ResponseThread inThread)
          Remove a thread from the response thread vector.
 void save(java.lang.String inInitFile)
          Initialize the service.
 void saveConfig()
          Save the configuration.
 void setDefaultServiceName(java.lang.String inServiceName)
          Set the name of the default service.
 void setHostName(java.lang.String inHostName)
          Set the HostName.
 void setLogFile(java.io.File inLogFile)
          Set the location of the log file.
 void setName(java.lang.String inName)
          Set the name of the service.
 void setPort(int inPort)
          Set the port on which this web map service should listen.
static void showUsage()
          Show the user how to use this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myInitFileName

public java.lang.String myInitFileName
Location of the initialization file.


WEB_MAP_SERVICE_NODE

public static final java.lang.String WEB_MAP_SERVICE_NODE
See Also:
Constant Field Values

EXTENDER_NODE

public static final java.lang.String EXTENDER_NODE
See Also:
Constant Field Values

EXTENDER_CLASS_TAG

public static final java.lang.String EXTENDER_CLASS_TAG
See Also:
Constant Field Values

HOST_NAME_TAG

public static final java.lang.String HOST_NAME_TAG
See Also:
Constant Field Values

PORT_NUMBER

public static final java.lang.String PORT_NUMBER
See Also:
Constant Field Values

DEFAULT_SERVICE_TAG

public static final java.lang.String DEFAULT_SERVICE_TAG
See Also:
Constant Field Values
Constructor Detail

WebMapService

public WebMapService()
Creates new WebMapService1_1_1

Method Detail

setPort

public void setPort(int inPort)
Set the port on which this web map service should listen.

Specified by:
setPort in interface ServerHolder

getPort

public int getPort()
Get the port on which this web maps service is listening.

Specified by:
getPort in interface ServerHolder

setName

public void setName(java.lang.String inName)
Set the name of the service.


getName

public java.lang.String getName()
Get the name of the service.


setDefaultServiceName

public void setDefaultServiceName(java.lang.String inServiceName)
Set the name of the default service.


getDefaultServiceName

public java.lang.String getDefaultServiceName()
Get the name of the default service.


getServer

protected Server getServer()
The response thread needs to get to the server in order to generate the image.


addExtensionService

public void addExtensionService(ExtensionService inExtensionService)
Add an extension service.


removeExtensionService

public void removeExtensionService(ExtensionService inExtensionService)
Remove an extension service.


getExtensionService

protected ExtensionService getExtensionService(java.lang.String inServiceName)
Get the extension service with the given name


addResponseThread

public void addResponseThread(ResponseThread inThread)
Add a thread to the response thread vector. This list is needed so these threads are not garbage collected prematurely.


removeResponseThread

public void removeResponseThread(ResponseThread inThread)
Remove a thread from the response thread vector.


init

public void init(java.lang.String inInitFile)
          throws java.lang.Exception
Initialize the service.

Throws:
java.lang.Exception

saveConfig

public void saveConfig()
                throws java.lang.Exception
Description copied from interface: ServerHolder
Save the configuration.

Specified by:
saveConfig in interface ServerHolder
Throws:
java.lang.Exception

save

public void save(java.lang.String inInitFile)
          throws java.lang.Exception
Initialize the service.

Throws:
java.lang.Exception

listen

public void listen()

setLogFile

public void setLogFile(java.io.File inLogFile)
Set the location of the log file.


log

public void log(java.lang.String inString)
Log the string to the log file.


log

public void log(java.lang.Throwable inT)
Log entries to the log files.


hasService

public boolean hasService(java.lang.String inName)
checks if this web server has the given service as one of it's available services.


main

public static void main(java.lang.String[] inArgs)
Main entry point for the 1_1_1 web map service.


showUsage

public static void showUsage()
Show the user how to use this class.


setHostName

public void setHostName(java.lang.String inHostName)
Set the HostName.

Specified by:
setHostName in interface ServerHolder

getHostName

public java.lang.String getHostName()
Get the host name.

Specified by:
getHostName in interface ServerHolder