ecologylab.services.distributed.legacy
Class HTTPGetServerToClientConnection

java.lang.Object
  extended by ecologylab.generic.Debug
      extended by ecologylab.services.distributed.legacy.ServerToClientConnection
          extended by ecologylab.services.distributed.legacy.HTTPGetServerToClientConnection
All Implemented Interfaces:
NetworkingConstants, ServerConstants, java.lang.Runnable

public class HTTPGetServerToClientConnection
extends ServerToClientConnection

ServerToClientConnection that can work with HTTP GET format requests.


Field Summary
protected  boolean ALLOW_HTTP_STYLE_REQUESTS
           
 
Fields inherited from class ecologylab.services.distributed.legacy.ServerToClientConnection
incomingSocket, inputStream, outputStreamWriter, running, servicesServer
 
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, DECODER, ENCODER, HTTP_HEADER_LINE_DELIMITER, HTTP_HEADER_TERMINATOR, MAX_HTTP_HEADER_LENGTH, MAX_PACKET_SIZE_BYTES, MAX_PACKET_SIZE_CHARACTERS, UNIQUE_IDENTIFIER_STRING
 
Constructor Summary
HTTPGetServerToClientConnection(java.net.Socket incomingSocket, ServicesServer servicesServer)
           
 
Method Summary
protected  boolean sendResponse(RequestMessage requestMessage, ResponseMessage responseMessage)
          Send the response message back to the client.
protected  RequestMessage translateXMLStringToRequestMessage(java.lang.String messageString)
          Use the ServicesServer and its ObjectRegistry to do the translation.
 
Methods inherited from class ecologylab.services.distributed.legacy.ServerToClientConnection
performService, readToMax, run, sendResponse, shutdown, stop, toString
 
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, warning, warning, weird, weird
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALLOW_HTTP_STYLE_REQUESTS

protected boolean ALLOW_HTTP_STYLE_REQUESTS
Constructor Detail

HTTPGetServerToClientConnection

public HTTPGetServerToClientConnection(java.net.Socket incomingSocket,
                                       ServicesServer servicesServer)
                                throws java.io.IOException
Throws:
java.io.IOException
Method Detail

translateXMLStringToRequestMessage

protected RequestMessage translateXMLStringToRequestMessage(java.lang.String messageString)
                                                     throws XMLTranslationException,
                                                            java.io.UnsupportedEncodingException
Use the ServicesServer and its ObjectRegistry to do the translation. Can be overridden to provide special functionalities

Overrides:
translateXMLStringToRequestMessage in class ServerToClientConnection
Parameters:
messageString -
Returns:
Throws:
XMLTranslationException
java.io.UnsupportedEncodingException

sendResponse

protected boolean sendResponse(RequestMessage requestMessage,
                               ResponseMessage responseMessage)
                        throws XMLTranslationException
Send the response message back to the client.

Overrides:
sendResponse in class ServerToClientConnection
Parameters:
responseMessage -
requestMessage - Provide context for response sending, when needed. May be ignored in some cases.
Returns:
True if the connection should be terminated after this.
Throws:
XMLTranslationException