01: /*
02: * Adding support for Netlet to run in HTTP mode by using Plain Sockets.
03: * A simple wrapper for abstracting the depdency on the underlying socket
04: * that's getting created.
05: *
06: * @author Rajesh T
07: * @date 16-July-2003
08: */
09: package com.sun.portal.netlet.client.common;
10:
11: import java.net.Socket;
12:
13: public class PlainSocketWrapper implements NetletSocketWrapper {
14:
15: /*
16: * Creates a new instance of PlainSocketWrapper
17: */
18:
19: public PlainSocketWrapper() {
20: }
21:
22: /*
23: * Nothing to initialize
24: */
25: public void init(boolean requireClientCert) {
26: }
27:
28: /*
29: * Creates a new Plain Socket
30: */
31:
32: public Socket getSocket(String destHost, int destPort,
33: String[] cipherSuites) {
34: try {
35: return new Socket(destHost, destPort);
36: } catch (Exception e) {
37: e.printStackTrace();
38: }
39: return null;
40: }
41:
42: /*
43: * Used in case ot proxy tunnel.
44: * @returns the same socket that's passed as the argument.
45: */
46:
47: public Socket getSocket(Socket tunnelSocket, String host, int port,
48: String[] cipherSuites) {
49: return tunnelSocket;
50: }
51:
52: /*
53: */
54: public void cleanup() {
55: }
56: }
|