Build 1.0_r1(from source)

java.net
Class SecureCacheResponse

java.lang.Object
  extended by java.net.CacheResponse
      extended by java.net.SecureCacheResponse

public abstract class SecureCacheResponse
extends CacheResponse

A secure cache response, which is orignally retrieved through secure ways.


Constructor Summary
SecureCacheResponse()
          Constructor method
 
Method Summary
abstract  String getCipherSuite()
          Gets the cipher suite string on the connection which is originally used to retrieve the network resource.
abstract  List<Certificate> getLocalCertificateChain()
          Gets local certificate chain.
abstract  Principal getLocalPrincipal()
          Gets the Principle that the original connection sent to the server.
abstract  Principal getPeerPrincipal()
          Gets the server's Principle.
abstract  List<Certificate> getServerCertificateChain()
          Gets server's certificate chain from cache.
 
Methods inherited from class java.net.CacheResponse
getBody, getHeaders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecureCacheResponse

public SecureCacheResponse()
Constructor method

Method Detail

getCipherSuite

public abstract String getCipherSuite()
Gets the cipher suite string on the connection which is originally used to retrieve the network resource.

Returns:
the cipher suite string

getLocalCertificateChain

public abstract List<Certificate> getLocalCertificateChain()
Gets local certificate chain. When the original connection retrieved the resource data, certificate chain was sent to the server during handshaking process. This method only takes effect when certificate-based cipher suite is enabled.

Returns:
the certificate chain that was sent to the server. The certificate chain is represented as a List of Certificate. If no certificate chain was sent, the method returns null.

getServerCertificateChain

public abstract List<Certificate> getServerCertificateChain()
                                                     throws SSLPeerUnverifiedException
Gets server's certificate chain from cache. As part of defining the session, the certificate chain was established when the original connection retrieved network resource. This method can only be invoked when certificated-based cypher suites is enable. Otherwise, it throws an SSLPeerUnverifiedException.

Returns:
The server's certificate chain, which is represented as a List of Certificate.
Throws:
SSLPeerUnverifiedException - If the peer is unverified.

getPeerPrincipal

public abstract Principal getPeerPrincipal()
                                    throws SSLPeerUnverifiedException
Gets the server's Principle. When the original connection retrieved network resource, the principle was established when defining the session.

Returns:
an Principal represents the server's principal.
Throws:
SSLPeerUnverifiedException - If the peer is unverified.

getLocalPrincipal

public abstract Principal getLocalPrincipal()
Gets the Principle that the original connection sent to the server. When the original connection fetched the network resource, the Principle was sent to the server during handshaking process.

Returns:
the principal sent to the server. Returns an X500Principal for X509-based cipher suites. If no principal was sent, it returns null.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature