ecologylab.services.distributed.legacy
Class HTTPGetServerToClientConnection
java.lang.Object
ecologylab.generic.Debug
ecologylab.services.distributed.legacy.ServerToClientConnection
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.
| 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 |
| 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 |
ALLOW_HTTP_STYLE_REQUESTS
protected boolean ALLOW_HTTP_STYLE_REQUESTS
HTTPGetServerToClientConnection
public HTTPGetServerToClientConnection(java.net.Socket incomingSocket,
ServicesServer servicesServer)
throws java.io.IOException
- Throws:
java.io.IOException
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