com.gridsystems.innergrid.api
Class AcceptCertificate

java.lang.Object
  extended by com.gridsystems.innergrid.api.AcceptCertificate
All Implemented Interfaces:
SSLConnectionInfo

public class AcceptCertificate
extends java.lang.Object
implements SSLConnectionInfo

SSLConnectionInfo implementation to accept only a specific certificate.

Version:
2.0
Author:
Xmas, Rodrigo Ruiz

Constructor Summary
AcceptCertificate(java.io.File file)
          Constructor.
AcceptCertificate(java.lang.String path)
          Creates a new instance.
 
Method Summary
 java.io.File getCertificate()
          Obtains the path to the accepted certificate file.
 java.lang.String getCertificateFile()
          Obtains the path to the accepted certificate file.
 javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
          Return a SSLSocktedFactory to accept a specific Certificate.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AcceptCertificate

public AcceptCertificate(java.io.File file)
Constructor.

Parameters:
file - a string with the path to the accepted certificate file

AcceptCertificate

public AcceptCertificate(java.lang.String path)
Creates a new instance.

Parameters:
path - Path to the certificate file
Method Detail

getCertificateFile

public java.lang.String getCertificateFile()
Obtains the path to the accepted certificate file.

Returns:
a string with the path to the accepted certificate file

getCertificate

public java.io.File getCertificate()
Obtains the path to the accepted certificate file.

Returns:
The path to the accepted certificate file

getSSLSocketFactory

public javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
                                                   throws KernelException
Return a SSLSocktedFactory to accept a specific Certificate.

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.