01: /*
02: * A simple interface for the abstract factory for creating sockets of different
03: * types. Provides a pluggable interface for adding custom Socket factories
04: *
05: * Currently supports 3 types of Factories
06: *
07: * PlainSockets : @ see PlainSocketWrapper
08: * JSSESockets : @ see JSSEWrapper
09: * KSSLSockets : @ see KSSLSocketWrapper
10: *
11: * PlainSockets :
12: * Used when GW is running in HTTP mode. No encryption is used in this case
13: *
14: * JSSESockets :
15: * Netlet Applet is running on a Java VM ( 1.2 or higher) where JSSE is installed
16: * and the GW is running in HTTPS Mode. Currently this is the only implementation that
17: * supports PDC and AES.
18: *
19: * KSSLSockets :
20: * Netlet Applet is running on a Java 1 VM or a Java 2 VM where JSSE jars are
21: * not installed. This implementation does not support PDC. For the List of Ciphers
22: * supported @ see com.sun.portal.kssl package.
23: *
24: * @author Rajesh T
25: * @date 16-July-2003
26: *
27: */
28: package com.sun.portal.netlet.client.common;
29:
30: import java.net.Socket;
31:
32: public interface NetletSocketWrapper {
33:
34: /*
35: * Initialize the factory
36: */
37:
38: public void init(boolean requireClientCert);
39:
40: //public Socket getSocket(String destHost, int destPort, String proxyHost, int proxyPort);
41: /*
42: * Create a direct connection to the GW.
43: */
44:
45: public Socket getSocket(String destHost, int destPort,
46: String[] cipherSuites);
47:
48: /*
49: * Upgrade a plain socket that used for proxy tunnel to a encryption socket
50: */
51:
52: public Socket getSocket(Socket tunnelSocket, String host, int port,
53: String[] cipherSuites);
54:
55: /*
56: * Clean up the factory
57: */
58:
59: public void cleanup();
60: }
|