Debian Codegraph @

ssl-proxies-tomcat/src/main/java/org/globus/gsi/tomcat/GlobusSSLSocket.java

raw
1 package org.globus.gsi.tomcat;
2
3 import java.io.IOException;
4 import java.io.InputStream;
5 import java.io.OutputStream;
6 import java.net.InetAddress;
7 import java.net.SocketAddress;
8 import java.net.SocketException;
9 import java.nio.channels.SocketChannel;
10 import javax.net.ssl.HandshakeCompletedListener;
11 import javax.net.ssl.SSLParameters;
12 import javax.net.ssl.SSLSession;
13 import javax.net.ssl.SSLSocket;
14
15
16 public class GlobusSSLSocket extends SSLSocket {
17
18 private SSLSocket socket;
19
20 public GlobusSSLSocket(SSLSocket socket){
21 this.socket = socket;
22 }
23
24 public void addHandshakeCompletedListener(HandshakeCompletedListener listener) {
25 socket.addHandshakeCompletedListener(listener);
26 }
27
28 public void bind(SocketAddress bindpoint) throws IOException {
29 socket.bind(bindpoint);
30 }
31
32 public void close() throws IOException {
33 socket.close();
34 }
35
36 public void connect(SocketAddress endpoint, int timeout) throws IOException {
37 socket.connect(endpoint, timeout);
38 }
39
40 public void connect(SocketAddress endpoint) throws IOException {
41 socket.connect(endpoint);
42 }
43
44 public boolean equals(Object obj) {
45 return socket.equals(obj);
46 }
47
48 public SocketChannel getChannel() {
49 return socket.getChannel();
50 }
51
52 public String[] getEnabledCipherSuites() {
53 return socket.getEnabledCipherSuites();
54 }
55
56 public String[] getEnabledProtocols() {
57 return socket.getEnabledProtocols();
58 }
59
60 public boolean getEnableSessionCreation() {
61 return socket.getEnableSessionCreation();
62 }
63
64 public InetAddress getInetAddress() {
65 return socket.getInetAddress();
66 }
67
68 public InputStream getInputStream() throws IOException {
69 return new GlobusSSLInputStream(socket.getInputStream(), socket);
70 }
71
72 public boolean getKeepAlive() throws SocketException {
73 return socket.getKeepAlive();
74 }
75
76 public InetAddress getLocalAddress() {
77 return socket.getLocalAddress();
78 }
79
80 public int getLocalPort() {
81 return socket.getLocalPort();
82 }
83
84 public SocketAddress getLocalSocketAddress() {
85 return socket.getLocalSocketAddress();
86 }
87
88 public boolean getNeedClientAuth() {
89 return socket.getNeedClientAuth();
90 }
91
92 public boolean getOOBInline() throws SocketException {
93 return socket.getOOBInline();
94 }
95
96 public OutputStream getOutputStream() throws IOException {
97 return socket.getOutputStream();
98 }
99
100 public int getPort() {
101 return socket.getPort();
102 }
103
104 public int getReceiveBufferSize() throws SocketException {
105 return socket.getReceiveBufferSize();
106 }
107
108 public SocketAddress getRemoteSocketAddress() {
109 return socket.getRemoteSocketAddress();
110 }
111
112 public boolean getReuseAddress() throws SocketException {
113 return socket.getReuseAddress();
114 }
115
116 public int getSendBufferSize() throws SocketException {
117 return socket.getSendBufferSize();
118 }
119
120 public SSLSession getSession() {
121 return socket.getSession();
122 }
123
124 public int getSoLinger() throws SocketException {
125 return socket.getSoLinger();
126 }
127
128 public int getSoTimeout() throws SocketException {
129 return socket.getSoTimeout();
130 }
131
132 public SSLParameters getSSLParameters() {
133 return socket.getSSLParameters();
134 }
135
136 public String[] getSupportedCipherSuites() {
137 return socket.getSupportedCipherSuites();
138 }
139
140 public String[] getSupportedProtocols() {
141 return socket.getSupportedProtocols();
142 }
143
144 public boolean getTcpNoDelay() throws SocketException {
145 return socket.getTcpNoDelay();
146 }
147
148 public int getTrafficClass() throws SocketException {
149 return socket.getTrafficClass();
150 }
151
152 public boolean getUseClientMode() {
153 return socket.getUseClientMode();
154 }
155
156 public boolean getWantClientAuth() {
157 return socket.getWantClientAuth();
158 }
159
160 public int hashCode() {
161 return socket.hashCode();
162 }
163
164 public boolean isBound() {
165 return socket.isBound();
166 }
167
168 public boolean isClosed() {
169 return socket.isClosed();
170 }
171
172 public boolean isConnected() {
173 return socket.isConnected();
174 }
175
176 public boolean isInputShutdown() {
177 return socket.isInputShutdown();
178 }
179
180 public boolean isOutputShutdown() {
181 return socket.isOutputShutdown();
182 }
183
184 public void removeHandshakeCompletedListener(HandshakeCompletedListener listener) {
185 socket.removeHandshakeCompletedListener(listener);
186 }
187
188 public void sendUrgentData(int data) throws IOException {
189 socket.sendUrgentData(data);
190 }
191
192 public void setEnabledCipherSuites(String[] suites) {
193 socket.setEnabledCipherSuites(suites);
194 }
195
196 public void setEnabledProtocols(String[] protocols) {
197 socket.setEnabledProtocols(protocols);
198 }
199
200 public void setEnableSessionCreation(boolean flag) {
201 socket.setEnableSessionCreation(flag);
202 }
203
204 public void setKeepAlive(boolean on) throws SocketException {
205 socket.setKeepAlive(on);
206 }
207
208 public void setNeedClientAuth(boolean need) {
209 socket.setNeedClientAuth(need);
210 }
211
212 public void setOOBInline(boolean on) throws SocketException {
213 socket.setOOBInline(on);
214 }
215
216 public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) {
217 socket.setPerformancePreferences(connectionTime, latency, bandwidth);
218 }
219
220 public void setReceiveBufferSize(int size) throws SocketException {
221 socket.setReceiveBufferSize(size);
222 }
223
224 public void setReuseAddress(boolean on) throws SocketException {
225 socket.setReuseAddress(on);
226 }
227
228 public void setSendBufferSize(int size) throws SocketException {
229 socket.setSendBufferSize(size);
230 }
231
232 public void setSoLinger(boolean on, int linger) throws SocketException {
233 socket.setSoLinger(on, linger);
234 }
235
236 public void setSoTimeout(int timeout) throws SocketException {
237 socket.setSoTimeout(timeout);
238 }
239
240 public void setSSLParameters(SSLParameters params) {
241 socket.setSSLParameters(params);
242 }
243
244 public void setTcpNoDelay(boolean on) throws SocketException {
245 socket.setTcpNoDelay(on);
246 }
247
248 public void setTrafficClass(int tc) throws SocketException {
249 socket.setTrafficClass(tc);
250 }
251
252 public void setUseClientMode(boolean mode) {
253 socket.setUseClientMode(mode);
254 }
255
256 public void setWantClientAuth(boolean want) {
257 socket.setWantClientAuth(want);
258 }
259
260 public void shutdownInput() throws IOException {
261 socket.shutdownInput();
262 }
263
264 public void shutdownOutput() throws IOException {
265 socket.shutdownOutput();
266 }
267
268 public void startHandshake() throws IOException {
269 socket.startHandshake();
270 }
271
272
273
274
275 }