Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] remote process streams

Hi,

If someone can come up with a proposal an how to replace the character stream based "java.io.Writer" with something dealing with byte[] instead, we would be very open to go for it. At the time we've implemented the ProcessLauncher, converting the stream data to a String seemed acceptable. If there is a better way to do it without the conversation step, please feel free to open a Bugzilla and provide a Gerrit change for getting things improved. Changing the existing implementation towards a more generic implementation to also support reading binary data from a remote process is definitely the more desired approach than providing a whole ProcessLauncher replacement implementation :-) :-).

Best regards, Uwe :)



> -----Original Message-----
> From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On
> Behalf Of Leherbauer, Anton (Toni)
> Sent: Freitag, 20. Mai 2016 09:21
> To: TCF Development
> Subject: Re: [tcf-dev] remote process streams
> 
> Hi Greg,
> 
> That's a valid point.
> This automatic character conversion step is unfortunate, especially since the
> final receiver of the data (IStreamsProxy, terminal or file) needs a binary
> stream anyway.
> I'd suggest to file a bug.
> A potential workaround is to not have the ProcessLauncher subscribe to and
> read from the streams, but do this on the client side.
> If you don't provide a streamsProxy in the constructor and don't set the
> properties IProcessLauncher.PROP_PROCESS_ASSOCIATE_CONSOLE
> IProcessLauncher.PROP_PROCESS_OUTPUT_REDIRECT_TO_FILE
> the ProcessLauncher won't touch the process streams (see
> ProcessLauncher.executeLaunch).
> Then the client is free to subscribe to the streams and read/write directly.
> I think it is necessary to subscribe to the streams before launching the process.
> 
> Hope this helps,
> Toni
> 
> -----Original Message-----
> From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On
> Behalf Of Greg Watson
> Sent: Thursday, May 19, 2016 10:27 PM
> To: TCF Development
> Subject: [tcf-dev] remote process streams
> 
> Hi,
> 
> I’m trying to adapt TCF to work with the o.e.remote framework. While most of
> the work is already done (thanks!), I’m working through some implementation
> issues and have hit a snag. The o.e.remote framework does not put any
> restrictions on output streams from remote processes, however from what I’ve
> been able to determine, the
> o.e.tcf.te.tcf.processes.core.launcher.ProcessStreamsListener converts
> incoming data from bytes into a String (line 227) before passing it to a Writer
> (which only support character streams.) This breaks anything that tries to read
> binary data from a remote process. Apart from providing a complete
> replacement implementation of ProcessLauncher, can anyone suggest another
> way to get around this problem?
> 
> Thanks,
> Greg
> 
> 
> _______________________________________________
> tcf-dev mailing list
> tcf-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit https://dev.eclipse.org/mailman/listinfo/tcf-dev
> _______________________________________________
> tcf-dev mailing list
> tcf-dev@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from
> this list, visit https://dev.eclipse.org/mailman/listinfo/tcf-dev

Back to the top