-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Whats the best way to stream the output? #38
Comments
It turns out once I use the piped in/out stream with another thread, I could get 'live' streaming response back. Just post my example here in case some one else needs it
You can close this issue now. |
@jasw thanks for submitting it and your example. please, close the issue (you're the author, it's better if you do it). thanks! |
Oops! Job |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
The shell.exec interface can take a outputStream to get the returning response,
I have used a few different OutputStream implementations trying to be able to read the output as the output comes in. I could easily pipe the output into input stream, but I found I could not read from input until the output is finished.
As an example, thinking if we are executing a long running or never ending command such as tail, of top, is there a way to be able to continuously feed the return?
I am thinking from a reactive programming point of view, if Jcabi can provide an API to do call backs for every line of response available.
If there are alternatives, please let me know.
Many thanks,
Jason
The text was updated successfully, but these errors were encountered: