|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface is a wrapper around a StringBuffer. It takes care of getting output from remote node , retaining it and flushing it to storage in some form. One of the fundamental questions was whether the output needs to be retained or not. If the output of the jobs is to be retained then lots of jobs with lots of lines of output will cause the application to run out of memory. However, if the output were to be discarded after every call, then we run the risk of reconnecting every time to the remote site to receive output. However, connections fail and in interactive situations (such as Website), this could cause problems. But, some applications need to access the output only once and so, it need not be retained. Since, the application/user is the best judge of whether the output needs to be retained or not, this interface will help to do that. We will use an IF_RETAIN boolean flag while retrieving output which if true means the output will be retained and if false, the it will be discarded. A function is also provided to write the output back to disk/network/console and another to reset the StringBuffer.
| Method Summary | |
void |
flush(java.io.Writer out)
Flushes (writes) output to specified destination. |
java.lang.StringBuffer |
get(boolean IF_RETAIN)
This method gets the job output and retains it if needed. |
java.lang.StringBuffer |
getFiltered(boolean IF_RETAIN)
Returns the filtered job output and retains if needed. |
void |
reset()
Resets the job output |
| Method Detail |
public java.lang.StringBuffer get(boolean IF_RETAIN)
throws java.lang.Exception
IF_RETAIN -
java.lang.Exception
public java.lang.StringBuffer getFiltered(boolean IF_RETAIN)
throws java.lang.Exception
IF_RETAIN -
java.lang.Exceptionpublic void reset()
public void flush(java.io.Writer out)
throws java.lang.Exception
out -
java.lang.Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||