| 1 |
package org.globus.gsi.tomcat; |
| 2 |
|
| 3 |
import java.io.IOException; |
| 4 |
import java.net.InetAddress; |
| 5 |
import java.net.Socket; |
| 6 |
import java.net.SocketAddress; |
| 7 |
import java.net.SocketException; |
| 8 |
import java.nio.channels.ServerSocketChannel; |
| 9 |
|
| 10 |
import javax.net.ssl.SSLServerSocket; |
| 11 |
import javax.net.ssl.SSLSocket; |
| 12 |
|
| 13 |
public class GlobusSSLSocketWrapper extends SSLServerSocket { |
| 14 |
|
| 15 |
private SSLServerSocket delegate; |
| 16 |
|
| 17 |
public GlobusSSLSocketWrapper(SSLServerSocket delegate) throws IOException { |
| 18 |
super(); |
| 19 |
this.delegate = delegate; |
| 20 |
} |
| 21 |
|
| 22 |
public Socket accept() throws IOException { |
| 23 |
return new GlobusSSLSocket((SSLSocket) delegate.accept()); |
| 24 |
} |
| 25 |
|
| 26 |
public void bind(SocketAddress endpoint, int backlog) throws IOException { |
| 27 |
delegate.bind(endpoint, backlog); |
| 28 |
} |
| 29 |
|
| 30 |
public void bind(SocketAddress endpoint) throws IOException { |
| 31 |
delegate.bind(endpoint); |
| 32 |
} |
| 33 |
|
| 34 |
public void close() throws IOException { |
| 35 |
delegate.close(); |
| 36 |
} |
| 37 |
|
| 38 |
public boolean equals(Object obj) { |
| 39 |
return delegate.equals(obj); |
| 40 |
} |
| 41 |
|
| 42 |
public ServerSocketChannel getChannel() { |
| 43 |
return delegate.getChannel(); |
| 44 |
} |
| 45 |
|
| 46 |
public String[] getEnabledCipherSuites() { |
| 47 |
return delegate.getEnabledCipherSuites(); |
| 48 |
} |
| 49 |
|
| 50 |
public String[] getEnabledProtocols() { |
| 51 |
return delegate.getEnabledProtocols(); |
| 52 |
} |
| 53 |
|
| 54 |
public boolean getEnableSessionCreation() { |
| 55 |
return delegate.getEnableSessionCreation(); |
| 56 |
} |
| 57 |
|
| 58 |
public InetAddress getInetAddress() { |
| 59 |
return delegate.getInetAddress(); |
| 60 |
} |
| 61 |
|
| 62 |
public int getLocalPort() { |
| 63 |
return delegate.getLocalPort(); |
| 64 |
} |
| 65 |
|
| 66 |
public SocketAddress getLocalSocketAddress() { |
| 67 |
return delegate.getLocalSocketAddress(); |
| 68 |
} |
| 69 |
|
| 70 |
public boolean getNeedClientAuth() { |
| 71 |
return delegate.getNeedClientAuth(); |
| 72 |
} |
| 73 |
|
| 74 |
public int getReceiveBufferSize() throws SocketException { |
| 75 |
return delegate.getReceiveBufferSize(); |
| 76 |
} |
| 77 |
|
| 78 |
public boolean getReuseAddress() throws SocketException { |
| 79 |
return delegate.getReuseAddress(); |
| 80 |
} |
| 81 |
|
| 82 |
public int getSoTimeout() throws IOException { |
| 83 |
return delegate.getSoTimeout(); |
| 84 |
} |
| 85 |
|
| 86 |
public String[] getSupportedCipherSuites() { |
| 87 |
return delegate.getSupportedCipherSuites(); |
| 88 |
} |
| 89 |
|
| 90 |
public String[] getSupportedProtocols() { |
| 91 |
return delegate.getSupportedProtocols(); |
| 92 |
} |
| 93 |
|
| 94 |
public boolean getUseClientMode() { |
| 95 |
return delegate.getUseClientMode(); |
| 96 |
} |
| 97 |
|
| 98 |
public boolean getWantClientAuth() { |
| 99 |
return delegate.getWantClientAuth(); |
| 100 |
} |
| 101 |
|
| 102 |
public int hashCode() { |
| 103 |
return delegate.hashCode(); |
| 104 |
} |
| 105 |
|
| 106 |
public boolean isBound() { |
| 107 |
return delegate.isBound(); |
| 108 |
} |
| 109 |
|
| 110 |
public boolean isClosed() { |
| 111 |
return delegate.isClosed(); |
| 112 |
} |
| 113 |
|
| 114 |
public void setEnabledCipherSuites(String[] suites) { |
| 115 |
delegate.setEnabledCipherSuites(suites); |
| 116 |
} |
| 117 |
|
| 118 |
public void setEnabledProtocols(String[] protocols) { |
| 119 |
delegate.setEnabledProtocols(protocols); |
| 120 |
} |
| 121 |
|
| 122 |
public void setEnableSessionCreation(boolean flag) { |
| 123 |
delegate.setEnableSessionCreation(flag); |
| 124 |
} |
| 125 |
|
| 126 |
public void setNeedClientAuth(boolean need) { |
| 127 |
delegate.setNeedClientAuth(need); |
| 128 |
} |
| 129 |
|
| 130 |
public void setPerformancePreferences(int connectionTime, int latency, int bandwidth) { |
| 131 |
delegate.setPerformancePreferences(connectionTime, latency, bandwidth); |
| 132 |
} |
| 133 |
|
| 134 |
public void setReceiveBufferSize(int size) throws SocketException { |
| 135 |
delegate.setReceiveBufferSize(size); |
| 136 |
} |
| 137 |
|
| 138 |
public void setReuseAddress(boolean on) throws SocketException { |
| 139 |
delegate.setReuseAddress(on); |
| 140 |
} |
| 141 |
|
| 142 |
public void setSoTimeout(int timeout) throws SocketException { |
| 143 |
delegate.setSoTimeout(timeout); |
| 144 |
} |
| 145 |
|
| 146 |
public void setUseClientMode(boolean mode) { |
| 147 |
delegate.setUseClientMode(mode); |
| 148 |
} |
| 149 |
|
| 150 |
public void setWantClientAuth(boolean want) { |
| 151 |
delegate.setWantClientAuth(want); |
| 152 |
} |
| 153 |
|
| 154 |
public String toString() { |
| 155 |
return delegate.toString(); |
| 156 |
} |
| 157 |
} |