|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--prupp.Responder
The base handler for a response from the server.
Field Summary | |
protected java.lang.String |
authuser
the authenticated userid if any |
protected java.io.DataInputStream |
clientis
inputstram from client |
protected java.io.DataOutputStream |
clientos
outputstream to client |
protected java.lang.String |
extrainfo
extra info we want |
protected java.lang.String |
requestLine
the requested url |
protected int |
statusCode
the status of the page fetched (proxys status, not the response code from the web server) |
Constructor Summary | |
Responder(java.lang.String reqLine,
java.io.DataInputStream input,
java.io.DataOutputStream output)
basic constructor |
Method Summary | |
protected void |
error(java.lang.String message)
write a simple error page (400 Bad Request) to the client |
protected void |
forbidden(java.net.URL url)
write an illegal access (403) to the client |
java.lang.String |
getAuthuser()
get the authuser for this request |
java.lang.String |
getExtraInfo()
get the extrainfo for this request |
java.lang.String |
getRequestLine()
get the requestLine for this request |
int |
getStatusCode()
get the current status of this request |
protected void |
internalError(java.lang.String message)
Write a 500 Internal Server Error to the client (problem with the proxy). |
protected void |
requestAuthentication(java.lang.String realm,
java.net.URL url)
write a 407 Proxy Authentication Required to the client |
protected void |
send(java.lang.String sb)
send data to the client |
void |
setAuthuser(java.lang.String authuser)
set the authuser for this request |
void |
setExtraInfo(java.lang.String extrainfo)
sets the extra information we want to save, this could be like compressionration etc |
void |
setRequestLine(java.lang.String reqLine)
set the requestLine for this request |
void |
setStatusCode(int statusCode)
sets the statusCode. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.io.DataOutputStream clientos
protected java.io.DataInputStream clientis
protected java.lang.String requestLine
protected int statusCode
protected java.lang.String authuser
protected java.lang.String extrainfo
Constructor Detail |
public Responder(java.lang.String reqLine, java.io.DataInputStream input, java.io.DataOutputStream output)
reqLine
- The request being handled.input
- The inputstream from the client.output
- The outputstream to the client.Method Detail |
public void setRequestLine(java.lang.String reqLine)
reqLine
- the new requestLinepublic java.lang.String getRequestLine()
public void setExtraInfo(java.lang.String extrainfo)
extrainfo
- the new information we want to savepublic java.lang.String getExtraInfo()
public void setAuthuser(java.lang.String authuser)
authuser
- the new authuserpublic java.lang.String getAuthuser()
public void setStatusCode(int statusCode)
statusCode
- the new StatusCodepublic int getStatusCode()
protected void error(java.lang.String message)
message
- a description of the errorprotected void forbidden(java.net.URL url)
url
- the URL that is unaccessable.protected void requestAuthentication(java.lang.String realm, java.net.URL url)
url
- the URL that is restrictedprotected void internalError(java.lang.String message)
message
- a description of the error that occuredprotected void send(java.lang.String sb)
sb
- the StringBuffer holding the data to be sent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |