| | |
| | | private boolean stopPooling; |
| | | private boolean pooling; |
| | | private ApplicationTrustManager trustManager; |
| | | private int connectTimeout = ConnectionUtils.getDefaultLDAPTimeout(); |
| | | private ConnectionProtocolPolicy connectionPolicy = |
| | | ConnectionProtocolPolicy.USE_MOST_SECURE_AVAILABLE; |
| | | private String ldapURL; |
| | |
| | | { |
| | | InitialLdapContext cloneLdc = |
| | | ConnectionUtils.cloneInitialLdapContext(userDataCtx, |
| | | ConnectionUtils.getDefaultLDAPTimeout(), |
| | | getConnectTimeout(), |
| | | getTrustManager(), null); |
| | | connectionPool.registerConnection(cloneLdc); |
| | | } |
| | |
| | | ctx = Utils.createLdapsContext(lastRemoteAdministrationURL, |
| | | lastWorkingBindDN, |
| | | lastWorkingBindPwd, |
| | | Utils.getDefaultLDAPTimeout(), null, |
| | | getConnectTimeout(), null, |
| | | getTrustManager()); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns the timeout to establish the connection in milliseconds. |
| | | * @return the timeout to establish the connection in milliseconds. |
| | | */ |
| | | public int getConnectTimeout() |
| | | { |
| | | return connectTimeout; |
| | | } |
| | | |
| | | /** |
| | | * Sets the timeout to establish the connection in milliseconds. |
| | | * Use {@code 0} to express no timeout. |
| | | * @param connectTimeout the timeout to establish the connection in |
| | | * milliseconds. |
| | | * Use {@code 0} to express no timeout. |
| | | */ |
| | | public void setConnectTimeout(int connectTimeout) |
| | | { |
| | | this.connectTimeout = connectTimeout; |
| | | connectionPool.setConnectTimeout(connectTimeout); |
| | | } |
| | | |
| | | /** |
| | | * Returns the connection policy to be used by this ControlPanelInfo (and in |
| | | * general by the control panel). |
| | | * @return the connection policy to be used by this ControlPanelInfo. |