1 23 24 29 package com.sun.appserv.management.client; 30 31 import java.io.File ; 32 import java.util.HashMap ; 33 import java.util.Map ; 34 35 import javax.net.ssl.TrustManager; 36 import javax.net.ssl.X509TrustManager; 37 import javax.net.ssl.HandshakeCompletedListener; 38 39 51 public final class AdminRMISSLClientSocketFactoryEnvImpl implements AdminRMISSLClientSocketFactoryEnv 53 { 54 private static AdminRMISSLClientSocketFactoryEnvImpl INSTANCE = null; 55 56 private transient TrustManager[] mTrustManagers = null; 57 private transient HandshakeCompletedListener mHandshakeCompletedListener = null; 58 59 private transient boolean mTrace = false; 60 61 private transient Map <String ,Object > mValues; 63 64 65 public static synchronized AdminRMISSLClientSocketFactoryEnvImpl 66 getInstance() 67 { 68 if ( INSTANCE == null ) 70 { 71 INSTANCE = new AdminRMISSLClientSocketFactoryEnvImpl(); 72 } 73 return( INSTANCE ); 74 } 75 76 private 77 AdminRMISSLClientSocketFactoryEnvImpl( ) 78 { 79 mTrustManagers = new TrustManager[0]; 82 83 mValues = new HashMap <String ,Object >(); 84 } 85 86 87 public Object 88 getValue( final String key ) 89 { 90 return( mValues.get( key ) ); 91 } 92 93 100 public Object 101 setValue( final String key, final Object value ) 102 { 103 return( mValues.put( key, value ) ); 104 } 105 106 112 public void 113 setTrustManagers( final TrustManager[] trustManagers ) 114 { 115 mTrustManagers = trustManagers; 116 } 117 118 public TrustManager[] 119 getTrustManagers( ) 120 { 121 return( mTrustManagers ); 122 } 123 124 129 public void 130 setHandshakeCompletedListener( final HandshakeCompletedListener listener ) 131 { 132 mHandshakeCompletedListener = listener; 133 } 134 135 public HandshakeCompletedListener 136 getHandshakeCompletedListener( ) 137 { 138 return( mHandshakeCompletedListener ); 139 } 140 141 146 public void 147 setTrace( final boolean trace ) 148 { 149 mTrace = trace; 150 } 151 public boolean 152 getTrace() 153 { 154 return( mTrace ); 155 } 156 157 } 158 | Popular Tags |