de.grogra.imp.net
Class HttpResponse
java.lang.Object
de.grogra.imp.net.HttpResponse
- All Implemented Interfaces:
- Command
public class HttpResponse
- extends java.lang.Object
- implements Command
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpResponse
public HttpResponse(HttpServer server,
Request request,
java.net.Socket client)
get
public static HttpResponse get(Context ctx)
getClient
public java.net.Socket getClient()
getCommandName
public java.lang.String getCommandName()
- Description copied from interface:
Command
- Returns a name which can be used in the graphical user interface
to represent this command.
- Specified by:
getCommandName
in interface Command
- Returns:
- this commands's name
getRequest
public Request getRequest()
getServer
public HttpServer getServer()
handleRequest
protected void handleRequest()
run
public void run(java.lang.Object info,
Context context)
- Description copied from interface:
Command
- Performs the actions of this command. This method is invoked
by the
JobManager
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.
- Specified by:
run
in interface Command
- Parameters:
info
- an argumentcontext
- a context
send
public void send(boolean cont)
send
public void send(boolean cont,
int status,
java.lang.String reason)
sendBadRequest
public void sendBadRequest()
setContent
public void setContent(java.lang.String mimeType,
byte[] content)
setContent
public void setContent(java.lang.String mimeType,
java.lang.String encoding,
java.lang.String content)
throws java.io.UnsupportedEncodingException
- Throws:
java.io.UnsupportedEncodingException
setException
public void setException(java.io.IOException ex)