de.grogra.imp.net
| Constructor and Description |
|---|
HttpResponse(HttpServer server,
Request request,
java.net.Socket client) |
| Modifier and Type | Method and Description |
|---|---|
static HttpResponse |
get(Context ctx) |
java.net.Socket |
getClient() |
java.lang.String |
getCommandName()
Returns a name which can be used in the graphical user interface
to represent this command.
|
Request |
getRequest() |
HttpServer |
getServer() |
protected void |
handleRequest() |
void |
run(java.lang.Object info,
Context context)
Performs the actions of this command.
|
void |
send(boolean cont) |
void |
send(boolean cont,
int status,
java.lang.String reason) |
void |
sendBadRequest() |
void |
setContent(java.lang.String mimeType,
byte[] content) |
void |
setContent(java.lang.String mimeType,
java.lang.String encoding,
java.lang.String content) |
void |
setException(java.io.IOException ex) |
public HttpResponse(HttpServer server, Request request, java.net.Socket client)
public static HttpResponse get(Context ctx)
public java.net.Socket getClient()
public java.lang.String getCommandName()
CommandgetCommandName in interface Commandpublic Request getRequest()
public HttpServer getServer()
protected void handleRequest()
public void run(java.lang.Object info,
Context context)
CommandJobManager after the command has been submitted
to the job manager by one of execute, runAt,
or runLater-methods. The arguments info
and context are the arguments which have been provided
as arguments to the JobManager-methods.public void send(boolean cont)
public void send(boolean cont,
int status,
java.lang.String reason)
public void sendBadRequest()
public void setContent(java.lang.String mimeType,
byte[] content)
public void setContent(java.lang.String mimeType,
java.lang.String encoding,
java.lang.String content)
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingExceptionpublic void setException(java.io.IOException ex)