comparison src/ch/ethz/ssh2/channel/ServerSessionImpl.java @ 307:071eccdff8ea ganymed

fix java formatting
author Carl Byington <carl@five-ten-sg.com>
date Wed, 30 Jul 2014 14:16:58 -0700
parents 91a31873c42a
children
comparison
equal deleted inserted replaced
305:d2b303406d63 307:071eccdff8ea
6 import java.io.OutputStream; 6 import java.io.OutputStream;
7 7
8 import ch.ethz.ssh2.ServerSession; 8 import ch.ethz.ssh2.ServerSession;
9 import ch.ethz.ssh2.ServerSessionCallback; 9 import ch.ethz.ssh2.ServerSessionCallback;
10 10
11 public class ServerSessionImpl implements ServerSession 11 public class ServerSessionImpl implements ServerSession {
12 { 12 Channel c;
13 Channel c; 13 public ServerSessionCallback sscb;
14 public ServerSessionCallback sscb;
15 14
16 public ServerSessionImpl(Channel c) 15 public ServerSessionImpl(Channel c) {
17 { 16 this.c = c;
18 this.c = c; 17 }
19 }
20 18
21 public int getState() 19 public int getState() {
22 { 20 return c.getState();
23 return c.getState(); 21 }
24 }
25 22
26 public InputStream getStdout() 23 public InputStream getStdout() {
27 { 24 return c.getStdoutStream();
28 return c.getStdoutStream(); 25 }
29 }
30 26
31 public InputStream getStderr() 27 public InputStream getStderr() {
32 { 28 return c.getStderrStream();
33 return c.getStderrStream(); 29 }
34 }
35 30
36 public OutputStream getStdin() 31 public OutputStream getStdin() {
37 { 32 return c.getStdinStream();
38 return c.getStdinStream(); 33 }
39 }
40 34
41 public void close() 35 public void close() {
42 { 36 try {
43 try 37 c.cm.closeChannel(c, "Closed due to server request", true);
44 { 38 }
45 c.cm.closeChannel(c, "Closed due to server request", true); 39 catch (IOException ignored) {
46 } 40 }
47 catch (IOException ignored) 41 }
48 {
49 }
50 }
51 42
52 public synchronized ServerSessionCallback getServerSessionCallback() 43 public synchronized ServerSessionCallback getServerSessionCallback() {
53 { 44 return sscb;
54 return sscb; 45 }
55 }
56 46
57 public synchronized void setServerSessionCallback(ServerSessionCallback sscb) 47 public synchronized void setServerSessionCallback(ServerSessionCallback sscb) {
58 { 48 this.sscb = sscb;
59 this.sscb = sscb; 49 }
60 }
61 } 50 }