Search in sources :

Example 1 with StreamGobbler

use of org.eclipse.linuxtools.systemtap.structures.runnable.StreamGobbler in project linuxtools by eclipse.

the class StreamGobblerTest method testStreamGobbler.

@Test
public void testStreamGobbler() {
    assertNotNull("StreamGobbler not null", sg);
    sg = new StreamGobbler(null);
    assertNotNull("StreamGobbler not null", sg);
    sg = new StreamGobbler(new TestStream());
    assertNotNull("StreamGobbler not null", sg);
}
Also used : StreamGobbler(org.eclipse.linuxtools.systemtap.structures.runnable.StreamGobbler) Test(org.junit.Test)

Example 2 with StreamGobbler

use of org.eclipse.linuxtools.systemtap.structures.runnable.StreamGobbler in project linuxtools by eclipse.

the class StreamGobblerTest method setUp.

@Before
public void setUp() {
    sg = new StreamGobbler(new TestStream());
    sg.start();
}
Also used : StreamGobbler(org.eclipse.linuxtools.systemtap.structures.runnable.StreamGobbler) Before(org.junit.Before)

Example 3 with StreamGobbler

use of org.eclipse.linuxtools.systemtap.structures.runnable.StreamGobbler in project linuxtools by eclipse.

the class ConsoleStreamDaemonTest method setUp.

@Before
public void setUp() {
    StreamGobbler gobbler = new StreamGobbler(System.in);
    gobbler.start();
    daemon = new ConsoleStreamDaemon(null);
}
Also used : StreamGobbler(org.eclipse.linuxtools.systemtap.structures.runnable.StreamGobbler) ConsoleStreamDaemon(org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ConsoleStreamDaemon) Before(org.junit.Before)

Example 4 with StreamGobbler

use of org.eclipse.linuxtools.systemtap.structures.runnable.StreamGobbler in project linuxtools by eclipse.

the class ErrorStreamDaemonTest method setUp.

@Before
public void setUp() {
    StreamGobbler gobbler = new StreamGobbler(System.in);
    gobbler.start();
    daemon = new ErrorStreamDaemon(null);
}
Also used : StreamGobbler(org.eclipse.linuxtools.systemtap.structures.runnable.StreamGobbler) ErrorStreamDaemon(org.eclipse.linuxtools.internal.systemtap.ui.consolelog.structures.ErrorStreamDaemon) Before(org.junit.Before)

Example 5 with StreamGobbler

use of org.eclipse.linuxtools.systemtap.structures.runnable.StreamGobbler in project linuxtools by eclipse.

the class ScpExec method init.

@Override
protected IStatus init() {
    try {
        channel = LinuxtoolsProcessFactory.execRemote(cmd, System.out, System.err, remoteOptions.userName, remoteOptions.hostName, remoteOptions.password, remoteOptions.port, envVars);
        errorGobbler = new StreamGobbler(channel.getExtInputStream());
        inputGobbler = new StreamGobbler(channel.getInputStream());
        transferListeners();
        return Status.OK_STATUS;
    } catch (final JSchException | IOException e) {
        return new Status(IStatus.ERROR, ConsoleLogPlugin.PLUGIN_ID, Messages.ScpExec_FileTransferFailed, e);
    }
}
Also used : JSchException(com.jcraft.jsch.JSchException) IStatus(org.eclipse.core.runtime.IStatus) Status(org.eclipse.core.runtime.Status) StreamGobbler(org.eclipse.linuxtools.systemtap.structures.runnable.StreamGobbler) IOException(java.io.IOException)

Aggregations

StreamGobbler (org.eclipse.linuxtools.systemtap.structures.runnable.StreamGobbler)5 Before (org.junit.Before)3 JSchException (com.jcraft.jsch.JSchException)1 IOException (java.io.IOException)1 IStatus (org.eclipse.core.runtime.IStatus)1 Status (org.eclipse.core.runtime.Status)1 ErrorStreamDaemon (org.eclipse.linuxtools.internal.systemtap.ui.consolelog.structures.ErrorStreamDaemon)1 ConsoleStreamDaemon (org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ConsoleStreamDaemon)1 Test (org.junit.Test)1