|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.monoserv.modules.data.HttpDataModule
public class HttpDataModule
This implements the IModuleData for passing a HttpResponse and a HttpRequest object around for modules to work on. Its rudimentary at the moment, but will enhance in features as needed in the near future.
com.monoserv.http.HttpResponse,
com.monoserv.http.HttpRequest| Constructor Summary | |
|---|---|
HttpDataModule()
Constructor - creates a default HttpResponse object and nulls the HttpRequest. |
|
| Method Summary | |
|---|---|
byte[] |
getDataBinary()
Only here because its required. |
int |
getDataFormat()
As of right now, we are assuming text data is being sent back. |
java.lang.String |
getDataString()
Returns the HTTP message as it is currently in memory. |
HttpRequest |
getHttpRequest()
Accessor method - returns the current HttpRequest object |
HttpResponse |
getHttpResponse()
Accessor method - returns the current HttpResponse object |
boolean |
hasData()
Determines if the data for this module actually exists. |
void |
readData(java.io.InputStream socketStream)
Method to retreive the HTTP data from the supplied input stream (most likely from a socket). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HttpDataModule()
HttpResponse#makeResponse(),
readData(InputStream)| Method Detail |
|---|
public int getDataFormat()
IModuleData#FORMAT_STRING_UTF8
public void readData(java.io.InputStream socketStream)
throws java.lang.RuntimeException
socketStream - The InputStream returned from getInputStream() from the connected socket.
java.lang.RuntimeException - If something goes wrong (reading error, I/O error, etc).public byte[] getDataBinary()
java.lang.UnsupportedOperationException - Thrown always, no matter what.public java.lang.String getDataString()
HttpResponse#getHttpMessage()public boolean hasData()
public HttpResponse getHttpResponse()
public HttpRequest getHttpRequest()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||