Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'profiling/org.eclipse.linuxtools.ssh.proxy/src/org/eclipse/linuxtools/internal/ssh/proxy/SSHProcess.java')
-rw-r--r--profiling/org.eclipse.linuxtools.ssh.proxy/src/org/eclipse/linuxtools/internal/ssh/proxy/SSHProcess.java122
1 files changed, 61 insertions, 61 deletions
diff --git a/profiling/org.eclipse.linuxtools.ssh.proxy/src/org/eclipse/linuxtools/internal/ssh/proxy/SSHProcess.java b/profiling/org.eclipse.linuxtools.ssh.proxy/src/org/eclipse/linuxtools/internal/ssh/proxy/SSHProcess.java
index 2137e3af92..131d321e24 100644
--- a/profiling/org.eclipse.linuxtools.ssh.proxy/src/org/eclipse/linuxtools/internal/ssh/proxy/SSHProcess.java
+++ b/profiling/org.eclipse.linuxtools.ssh.proxy/src/org/eclipse/linuxtools/internal/ssh/proxy/SSHProcess.java
@@ -10,8 +10,8 @@
*******************************************************************************/
package org.eclipse.linuxtools.internal.ssh.proxy;
-import java.io.InputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.io.OutputStream;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -20,73 +20,73 @@ import com.jcraft.jsch.ChannelExec;
public class SSHProcess extends Process {
- private ChannelExec channel;
- private static final long DELAY = 100;
+ private ChannelExec channel;
+ private static final long DELAY = 100;
- public SSHProcess(ChannelExec channel) {
- this.channel = channel;
- }
+ public SSHProcess(ChannelExec channel) {
+ this.channel = channel;
+ }
- @Override
- public OutputStream getOutputStream() {
- try {
- return channel.getOutputStream();
- } catch (IOException e) {
- return null;
- }
- }
+ @Override
+ public OutputStream getOutputStream() {
+ try {
+ return channel.getOutputStream();
+ } catch (IOException e) {
+ return null;
+ }
+ }
- @Override
- public InputStream getInputStream() {
- try {
- return channel.getInputStream();
- } catch (IOException e) {
- return null;
- }
- }
+ @Override
+ public InputStream getInputStream() {
+ try {
+ return channel.getInputStream();
+ } catch (IOException e) {
+ return null;
+ }
+ }
- @Override
- public InputStream getErrorStream() {
- try {
- return channel.getErrStream();
- } catch (IOException e) {
- return null;
- }
- }
+ @Override
+ public InputStream getErrorStream() {
+ try {
+ return channel.getErrStream();
+ } catch (IOException e) {
+ return null;
+ }
+ }
- @Override
- public int waitFor() throws InterruptedException {
- while (!channel.isClosed()) {
- Thread.sleep(DELAY);
- }
- return channel.getExitStatus();
- }
+ @Override
+ public int waitFor() throws InterruptedException {
+ while (!channel.isClosed()) {
+ Thread.sleep(DELAY);
+ }
+ return channel.getExitStatus();
+ }
- @Override
- public int exitValue() {
- if (!channel.isClosed()) {
- throw new IllegalThreadStateException();
- }
- return channel.getExitStatus();
- }
+ @Override
+ public int exitValue() {
+ if (!channel.isClosed()) {
+ throw new IllegalThreadStateException();
+ }
+ return channel.getExitStatus();
+ }
- @Override
- public void destroy() {
- channel.disconnect();
- }
+ @Override
+ public void destroy() {
+ channel.disconnect();
+ }
- protected int waitAndRead(OutputStream output, OutputStream err, IProgressMonitor monitor) {
- channel.setOutputStream(output);
- channel.setErrStream(err);
- while (!channel.isClosed() && !monitor.isCanceled()) {
- try {
- Thread.sleep(DELAY);
- } catch (InterruptedException e) {
- }
- }
+ protected int waitAndRead(OutputStream output, OutputStream err, IProgressMonitor monitor) {
+ channel.setOutputStream(output);
+ channel.setErrStream(err);
+ while (!channel.isClosed() && !monitor.isCanceled()) {
+ try {
+ Thread.sleep(DELAY);
+ } catch (InterruptedException e) {
+ }
+ }
- channel.setOutputStream(null);
- channel.setErrStream(null);
- return channel.getExitStatus();
- }
+ channel.setOutputStream(null);
+ channel.setErrStream(null);
+ return channel.getExitStatus();
+ }
}

Back to the top