com.gridsystems.innergrid.api
Class AcceptCertificateOfKeyStore

java.lang.Object
  extended by com.gridsystems.innergrid.api.AcceptCertificateOfKeyStore
All Implemented Interfaces:
SSLConnectionInfo
Direct Known Subclasses:
AcceptCertificateOfSystemKeyStore

public class AcceptCertificateOfKeyStore
extends java.lang.Object
implements SSLConnectionInfo

SSLConnectionInfo implementation to accept any certificate from a given keystore file.

Version:
2.0
Author:
Xmas, Rodrigo Ruiz

Constructor Summary
AcceptCertificateOfKeyStore(java.io.File kfile, java.lang.String kpassword)
          Constructor.
AcceptCertificateOfKeyStore(java.lang.String kfilepath, java.lang.String kpassword)
          Constructor.
 
Method Summary
 java.io.File getKeystore()
          Gets the path to the Keystore file.
 java.lang.String getKeystoreFile()
          Gets the path to the Keystore file.
 java.lang.String getKeystorePassword()
          Gets the password to access the Keystore file.
 javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
          Get SSL Socket Factory For use with KeyStore file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcceptCertificateOfKeyStore

public AcceptCertificateOfKeyStore(java.lang.String kfilepath,
                                   java.lang.String kpassword)
Constructor.

Parameters:
kfilepath - a string with the path to the Keystore file.
kpassword - a string with the password to access the Keystore file.

AcceptCertificateOfKeyStore

public AcceptCertificateOfKeyStore(java.io.File kfile,
                                   java.lang.String kpassword)
Constructor.

Parameters:
kfile - The Keystore file.
kpassword - The password to access the Keystore file.
Method Detail

getKeystoreFile

public java.lang.String getKeystoreFile()
Gets the path to the Keystore file.

Returns:
a string with the path to the Keystore file.

getKeystore

public java.io.File getKeystore()
Gets the path to the Keystore file.

Returns:
a string with the path to the Keystore file.

getKeystorePassword

public java.lang.String getKeystorePassword()
Gets the password to access the Keystore file.

Returns:
a string with the password to access the Keystore file.

getSSLSocketFactory

public javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
                                                   throws KernelException
Get SSL Socket Factory For use with KeyStore file.

Specified by:
getSSLSocketFactory in interface SSLConnectionInfo
Returns:
A SSLSocketFactory to establish connection
Throws:
KernelException - If error


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.