|
SRJRCFrames v0.1.296 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.schwarzrot.net.http.service.AbstractRequestHandler
public abstract class AbstractRequestHandler
base class for request handlers.
| Field Summary |
|---|
| Fields inherited from interface de.schwarzrot.net.http.service.RequestHandler |
|---|
HTTP_CONTENT_LENGTH, HTTP_LANGUAGE, MIME_CSS, MIME_GIF, MIME_HTML, MIME_ICON, MIME_JPEG, MIME_JS, MIME_JSON, MIME_PNG, MIME_TIFF, MIME_UNKNOWN, QUERY_STRING, REQUEST_DEFAULT_HANDLER, REQUEST_DEFAULT_URL, REQUEST_GET_METHOD, REQUEST_HELP_URL, REQUEST_JSON_CHECK, REQUEST_LOCATION, REQUEST_METHOD, REQUEST_OPTIONS_METHOD, REQUEST_POST_METHOD, REQUEST_TIME, REQUEST_URI, REQUEST_WEBIF_BASE, REQUEST_WEBIF_EXT, REQUEST_WEBIF_ROOT, RESPONSE_HEADER, RESPONSE_LEN_HEADER, RESPONSE_STATUS_HEADER, SERVER_PROTOCOL |
| Constructor Summary | |
|---|---|
AbstractRequestHandler()
|
|
| Method Summary | ||
|---|---|---|
protected
|
doIDAction(PrintWriter writer,
Map<String,String> args,
Class<E> clazz,
RequestHandlerAction<E> action)
|
|
protected String |
getHandlerIdentifier()
|
|
protected org.apache.commons.logging.Log |
getLogger()
|
|
ProtocolHandler |
getProtocolHandler()
getter for the ProtocolHandler, which is used for general error
or help message handling |
|
protected HTTPServer<?> |
getServer()
|
|
TransactionFactory |
getTransactionFactory()
getter for the TransactionFactory - just to avoid synthetic
accessors for anonymous classes |
|
protected void |
initResponse(OutputStream os,
String mimeType,
Date lastModificationTime,
long contentLength,
String lang)
|
|
protected void |
initResponse(PrintWriter writer,
String mimeType,
Date lastModificationTime,
long contentLength,
String lang)
|
|
boolean |
replySuccess(PrintWriter writer)
centralized message creator service. |
|
abstract boolean |
replySuccess(PrintWriter writer,
HttpStatusCode status,
String errorMessage)
centralized message creator service |
|
void |
setup(String handlerID,
ProtocolHandler ph)
start the second stage of configuration. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.schwarzrot.net.http.service.RequestHandler |
|---|
process, usage |
| Constructor Detail |
|---|
public AbstractRequestHandler()
| Method Detail |
|---|
public final ProtocolHandler getProtocolHandler()
RequestHandlerProtocolHandler, which is used for general error
or help message handling
getProtocolHandler in interface RequestHandlerProtocolHandler instancepublic final TransactionFactory getTransactionFactory()
RequestHandlerTransactionFactory - just to avoid synthetic
accessors for anonymous classes
getTransactionFactory in interface RequestHandler
public boolean replySuccess(PrintWriter writer)
throws Exception
RequestHandler
replySuccess in interface RequestHandlerwriter - - the communication channel to the client
Exception - - type of exception varies depending on the protocol used
public abstract boolean replySuccess(PrintWriter writer,
HttpStatusCode status,
String errorMessage)
throws Exception
RequestHandler
replySuccess in interface RequestHandlerwriter - - the communication channel to the clientstatus - - the status code of the last requesterrorMessage - - the error message for the client
Exception - - type of exception varies depending on the protocol used
public void setup(String handlerID,
ProtocolHandler ph)
RequestHandler
setup in interface RequestHandlerhandlerID - - the identifier this handler acts upon. The identifier
typically is the first name after the domain/port-part.ph - - the ProtocolHandler instance
protected <E extends Entity> void doIDAction(PrintWriter writer,
Map<String,String> args,
Class<E> clazz,
RequestHandlerAction<E> action)
throws Exception
Exceptionprotected String getHandlerIdentifier()
protected org.apache.commons.logging.Log getLogger()
protected final HTTPServer<?> getServer()
protected void initResponse(OutputStream os,
String mimeType,
Date lastModificationTime,
long contentLength,
String lang)
protected void initResponse(PrintWriter writer,
String mimeType,
Date lastModificationTime,
long contentLength,
String lang)
|
SRJRCFrames v0.1.296 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||