Need way to provide flexible textual output from method call

S

Sean Aitken

Hi folks!

I was thinking of implementing a Java class that contained a method that
accepts an optional type of text stream parameter for providing real
time results of processing during the method call. *whew*

Basically, I want to have a function that can be called from a web page
that spits out results in real time (from within the function). I'd
also like the function to spit out results to a console, if thats the case.

I was thinking about having some sort of TextStrem object as parameter
(or some other common derivative of HttpResponse.out and System.out),
which can then be written to during the function call.. maybe even
calling flush() on the Http object.

Anyone with experience doing this? Right now for long processes I am
implementing a JSP page to produce results. I'd like to wrap up some of
this stuff into my beeeens.

Many Thanks!

-Sean
 
C

Cid

I was thinking of implementing a Java class that contained a method that
accepts an optional type of text stream parameter for providing real
time results of processing during the method call. *whew*

Basically, I want to have a function that can be called from a web page
that spits out results in real time (from within the function). I'd
also like the function to spit out results to a console, if thats the case.

If you really want text output, how about java.util.logging?

Alternately, consider passing in a more generic 'monitor' interface
that your function can send progress messages to. That would leave you
free to provide alternate representations of that progress info -
graphical or textual, etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top