Methods Summary |
---|
public java.lang.String | getDescription()Gets the description for html page
return this.description;
|
public java.lang.String | getHandledPath()Gets the server path
return this.handledPath;
|
public java.lang.String | getReplyHTML()Gets the HTML data of the reply HTTP message
return this.ReplyHTML;
|
public java.lang.String | getReplyType()Gets the content type of the reply HTTP message
return this.ReplyType;
|
public java.lang.String | getTitle()Gets the title for html page
return this.title;
|
public boolean | handleRequest(java.lang.String request, java.io.Writer out)Handles the given request and writes the reply to the given out-stream.
String path = "";
String query = null;
try {
URL url = new URL("http://localhost"+request);
path = url.getPath();
query = url.getPath();
if (path.equals(handledPath) == false) {
return false;
}
out.write("HTTP/1.0 200 OK\r\n");
if (ReplyType != null)
out.write(ReplyType);
if (ReplyHTML != null)
out.write(ReplyHTML);
out.flush();
return true;
} catch (Exception ex) {
return false;
}
|
public void | setDescription(java.lang.String description)Sets the description for html page
this.description = description;
|
public void | setHandledPath(java.lang.String path)Sets the server path
this.handledPath = path;
|
public void | setReplyHTML(java.lang.String ReplyHTML)Sets the HTML data of the reply HTTP message
this.ReplyHTML = ReplyHTML;
|
public void | setReplyType(java.lang.String ReplyType)Sets the content type of the reply HTTP message
this.ReplyType = ReplyType;
|
public void | setTitle(java.lang.String title)Sets the title for html page
this.title = title;
|