|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.objectwave.appArch.admin.HTTPCommandImpl
Expose Command Callback functions through HTTP.
| Nested Class Summary | |
static class |
HTTPCommandImpl.Test
|
| Constructor Summary | |
HTTPCommandImpl()
|
|
| Method Summary | |
protected void |
addCommandChildren(TreeCollection tree,
java.lang.Object node,
java.lang.String divName,
java.lang.StringBuffer result)
While similar to FormatCommands, this method builds the child nodes in the tree. |
protected java.io.InputStream |
fileFetch(java.lang.String fileName)
Not the most efficient way to serve a file to the browser, but this should not be used under heavy load. |
protected void |
formatCommands(TreeCollection tree,
java.lang.StringBuffer result)
Format the BODY portion of the HTML document for all of the commands. |
Command[] |
getAllCommands()
Get the callback commands from the CallbackService. |
protected java.lang.String |
getAllCommandsHTML()
Create an HTML body that will represent all of the regestered commands. |
java.lang.String |
getDocHeader(java.lang.String title,
java.lang.String javascript,
java.lang.String bodyAttributes)
Start the HTML document and fill in the required fields. |
protected java.lang.String |
getSeedString()
The seedstring will be included in the HTML header of the getAllCommands request. |
java.lang.String |
getTail()
|
void |
initialize()
|
protected java.io.InputStream |
processCommandWork(java.lang.String commandString,
java.lang.String argString)
Process the command and return the results. |
protected java.io.InputStream |
processFormRequest(java.lang.String urlRequest,
int idx)
The URL request was the result of a Form 'get' method. |
java.io.InputStream |
processRequest(java.lang.String urlRequest)
Process an incomming URL request. |
protected java.io.InputStream |
processRequest(java.lang.String urlRequest,
int idx)
Process the urlRequest as a either a noArg request, or a request that was formatted to a custom style. |
void |
shutdown()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HTTPCommandImpl()
| Method Detail |
public java.lang.String getDocHeader(java.lang.String title,
java.lang.String javascript,
java.lang.String bodyAttributes)
title - The title to use for the HTML document.javascript - The data to place in the HEAD portion of the html
document.bodyAttributes - A string to put within the BODY tag. Can be used to
specify an 'onLoad' event handler.
public java.lang.String getTail()
public Command[] getAllCommands()
protected java.lang.String getAllCommandsHTML()
protected java.lang.String getSeedString()
public void initialize()
public void shutdown()
public java.io.InputStream processRequest(java.lang.String urlRequest)
processRequest in interface ReplyHandlerurlRequest - The command received from the browser.
protected java.io.InputStream processFormRequest(java.lang.String urlRequest,
int idx)
urlRequest - A URL that is a form 'get' request.idx - The index of the start of the arguments in the URL
processCommandWork(java.lang.String, java.lang.String)
protected java.io.InputStream processRequest(java.lang.String urlRequest,
int idx)
urlRequest - A URL that should identify a command in the command
callback service.idx - int The index of a ":" in the urlRequest. This was the
original mechanism for parameter processing.
processCommandWork(java.lang.String, java.lang.String)protected java.io.InputStream fileFetch(java.lang.String fileName)
fileName - The name of resource to return as an InputStream.
protected java.io.InputStream processCommandWork(java.lang.String commandString,
java.lang.String argString)
commandString - A known registered command or a file resource.argString - Comma separated arguments.
protected void formatCommands(TreeCollection tree,
java.lang.StringBuffer result)
tree - com.objectwave.utility.TreeCollection A tree datastructure
containing all of the commands.result - The formatted body will be built upon this buffer provided
as this parameter.
protected void addCommandChildren(TreeCollection tree,
java.lang.Object node,
java.lang.String divName,
java.lang.StringBuffer result)
tree - com.objectwave.utility.TreeCollection A tree datastructure
containing all of the commands.node - The node in the TreeCollection that is being processed.divName - This is the name the JavaScript will use to identify this
command.result - The formatted child commands will be built upon this buffer
provided as this parameter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||