ikrs.httpd.response.successful
Class OK
java.lang.Object
ikrs.httpd.AbstractPreparedResponse
ikrs.httpd.response.GeneralPreparedResponse
ikrs.httpd.response.successful.OK
- All Implemented Interfaces:
- PreparedHTTPResponse
public class OK
- extends GeneralPreparedResponse
This interface is meant to wrap prepared HTTP reply objects.
Method Summary |
void |
dispose()
This method will be called in the final end - even if the execute() method failed. |
protected PostDataWrapper |
getPostData()
Get the wrapped POST data from the current request. |
void |
prepare(java.util.Map<java.lang.String,BasicType> optionalReturnSettings)
This method must be implemented by all subclasses. |
Methods inherited from class ikrs.httpd.AbstractPreparedResponse |
addResponseHeader, execute, getHTTPHandler, getReasonPhrase, getRequestHeaders, getResponseDataResource, getResponseHeaders, getSessionID, getSocket, getSocketID, getStatusCode, isDisposed, isExecuted, isPrepared, setDisposed, setPrepared, setReasonPhrase, setResponseDataResource, setStatusCode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OK
public OK(HTTPHandler handler,
HTTPHeaders headers,
PostDataWrapper postData,
java.util.UUID socketID,
java.net.Socket socket,
java.util.UUID sessionID)
getPostData
protected PostDataWrapper getPostData()
- Get the wrapped POST data from the current request.
prepare
public void prepare(java.util.Map<java.lang.String,BasicType> optionalReturnSettings)
throws MalformedRequestException,
UnsupportedVersionException,
UnsupportedMethodException,
UnknownMethodException,
ConfigurationException,
java.util.MissingResourceException,
AuthorizationException,
HeaderFormatException,
DataFormatException,
UnsupportedFormatException,
ParametrizedHTTPException,
java.lang.SecurityException,
java.io.IOException
- This method must be implemented by all subclasses. It must prepare the HTTP response.
This means that all required ressources must be acquired (use locks), all headers prepared (by the use
of addResponseHeader(String,String) or getResponseHeaders()) and perform all necessary security checks.
Subclasses implementing this method should call the setPrepared() method when ready.
- Specified by:
prepare
in interface PreparedHTTPResponse
- Overrides:
prepare
in class GeneralPreparedResponse
- Parameters:
optionalReturnSettings
- This (optional, means may be null) map can be used to retrieve internal values
for error recovery.
- Throws:
MalformRequestException
- If the passed HTTP request headers are malformed and cannot be processed.
UnsupportedVersionException
- If the headers' HTTP version is not supported (supported versions are
1.0 and 1.1).
UnsupportedMethodException
- If the request method is valid but not supported (status code 405).
UnknownMethodException
- If the headers' method (from the request line) is unknown.
ConfigurationException
- If the was a server configuration issue the server cannot work properly with.
java.util.MissingResourceException
- If the requested resource cannot be found.
AuthorizationException
- If the requested resource requires authorization.
HeaderFormatException
- If the passed headers are malformed.
DataFormatException
- If the passed data is malformed.
java.lang.SecurityException
- If the request cannot be processed due to security reasons.
java.io.IOException
- If any IO errors occur.
MalformedRequestException
UnsupportedFormatException
ParametrizedHTTPException
dispose
public void dispose()
- This method will be called in the final end - even if the execute() method failed.
Subclasses implementing this method should call the setDisposed() method when done.
It has to clean up, release resources and all locks!
- Specified by:
dispose
in interface PreparedHTTPResponse
- Overrides:
dispose
in class GeneralPreparedResponse