| IStreamListener is missing data at beginning of stream [message #644417]
||Fri, 10 December 2010 21:14
| Mirko Raner
Registered: July 2009
Location: San Diego, CA
we're using org.eclipse.debug.core to launch another process that needs to communicate with the workbench. Standard out of the process is used to synchronize some additional socket communication (i.e, when certain data is received from standard out, the workbench needs to establish a socket connection to the process).
To intercept data that is sent to standard out, we use an IStreamListener. The IStreamListener is added when an ILaunchesListener2.launchesAdded(...) or launchesChanged(...) is called and a newly added IProcess was detected. It seems like this is the earliest possible hook to receive notification of data being written to standard out. However, it's apparently not early enough since we're intermittently missing output that was sent right after the process started. The console view's StreamListener picks up the data (and prints it to the console), but our additional listener doesn't. It looks like our code is sometimes just a little bit too late with adding our own IStreamListener.
Are there any design patterns out there that would guarantee that a custom IStreamListener receives all output (including very early messages) from an IProcess? Is there some alternative to IStreamListener that achieves the same thing?
Powered by FUDForum
. Page generated in 0.02256 seconds