1 package fr.in2p3.jsaga.adaptor.job;
2
3 import org.globus.io.gass.server.JobOutputListener;
4
5 import java.io.IOException;
6 import java.io.OutputStream;
7
8
9
10
11
12
13
14
15
16
17
18
19
20 public class GatekeeperJobOutputListener implements JobOutputListener {
21 private OutputStream m_outputStream;
22
23 public GatekeeperJobOutputListener(OutputStream stdout) {
24 m_outputStream = stdout;
25 }
26
27 public void outputChanged(String s) {
28 if (m_outputStream != null) {
29 try {
30 m_outputStream.write(s.getBytes());
31 } catch (IOException e) {
32 }
33 } else {
34
35 }
36 }
37
38 public void outputClosed() {
39 if (m_outputStream != null) {
40 try {
41 m_outputStream.close();
42 } catch (IOException e) {
43 }
44 } else {
45
46 }
47 }
48 }