# SecureCacheResponse

public abstract class **SecureCacheResponse** extends [CacheResponse](https://developers.google.com/j2objc/javadoc/jre/reference/java/net/CacheResponse.html)  
Represents a cache response originally retrieved through secure
means, such as TLS.

### Public Constructor Summary

|---|---|
|   | [SecureCacheResponse](https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SecureCacheResponse.html#SecureCacheResponse())() |

### Public Method Summary

|---|---|
| abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getCipherSuite](https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SecureCacheResponse.html#getCipherSuite())() Returns the cipher suite in use on the original connection that retrieved the network resource. |
| abstract [List](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/List.html)\<[Certificate](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Certificate.html)\> | [getLocalCertificateChain](https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SecureCacheResponse.html#getLocalCertificateChain())() Returns the certificate chain that were sent to the server during handshaking of the original connection that retrieved the network resource. |
| abstract [Principal](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Principal.html) | [getLocalPrincipal](https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SecureCacheResponse.html#getLocalPrincipal())() Returns the principal that was sent to the server during handshaking in the original connection that retrieved the network resource. |
| abstract [Principal](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Principal.html) | [getPeerPrincipal](https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SecureCacheResponse.html#getPeerPrincipal())() Returns the server's principal which was established as part of defining the session during the original connection that retrieved the network resource. |
| abstract [List](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/List.html)\<[Certificate](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Certificate.html)\> | [getServerCertificateChain](https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SecureCacheResponse.html#getServerCertificateChain())() Returns the server's certificate chain, which was established as part of defining the session in the original connection that retrieved the network resource, from cache. |

### Inherited Method Summary

From class [java.net.CacheResponse](https://developers.google.com/j2objc/javadoc/jre/reference/java/net/CacheResponse.html)

|---|---|
| abstract [InputStream](https://developers.google.com/j2objc/javadoc/jre/reference/java/io/InputStream.html) | [getBody](https://developers.google.com/j2objc/javadoc/jre/reference/java/net/CacheResponse.html#getBody())() Returns the response body as an InputStream. |
| abstract [Map](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/Map.html)\<[String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html), [List](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/List.html)\<[String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)\>\> | [getHeaders](https://developers.google.com/j2objc/javadoc/jre/reference/java/net/CacheResponse.html#getHeaders())() Returns the response headers as a Map. |

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

## Public Constructors

#### public
**SecureCacheResponse**
()

<br />

## Public Methods

#### public abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**getCipherSuite**
()

Returns the cipher suite in use on the original connection that
retrieved the network resource.

##### Returns

- a string representing the cipher suite

#### public abstract [List](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/List.html)\<[Certificate](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Certificate.html)\>
**getLocalCertificateChain**
()

Returns the certificate chain that were sent to the server during
handshaking of the original connection that retrieved the
network resource. Note: This method is useful only
when using certificate-based cipher suites.

##### Returns

- an immutable List of Certificate representing the certificate chain that was sent to the server. If no certificate chain was sent, null will be returned.

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SecureCacheResponse.html#getLocalPrincipal()`

#### public abstract [Principal](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Principal.html)
**getLocalPrincipal**
()

Returns the principal that was sent to the server during
handshaking in the original connection that retrieved the
network resource.

##### Returns

- the principal sent to the server. Returns an X500Principal of the end-entity certificate for X509-based cipher suites, and KerberosPrincipal for Kerberos cipher suites. If no principal was sent, then null is returned.

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SecureCacheResponse.html#getLocalCertificateChain()`
- `https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SecureCacheResponse.html#getPeerPrincipal()`

#### public abstract [Principal](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/Principal.html)
**getPeerPrincipal**
()

Returns the server's principal which was established as part of
defining the session during the original connection that
retrieved the network resource.

##### Returns

- the server's principal. Returns an X500Principal of the end-entity certiticate for X509-based cipher suites, and KerberosPrincipal for Kerberos cipher suites.

##### Throws

| [SSLPeerUnverifiedException](https://developers.google.com/j2objc/javadoc/jre/reference/javax/net/ssl/SSLPeerUnverifiedException.html) | if the peer was not verified. |
|---|---|

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SecureCacheResponse.html#getServerCertificateChain()`
- `https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SecureCacheResponse.html#getLocalPrincipal()`

#### public abstract [List](https://developers.google.com/j2objc/javadoc/jre/reference/java/util/List.html)\<[Certificate](https://developers.google.com/j2objc/javadoc/jre/reference/java/security/cert/Certificate.html)\>
**getServerCertificateChain**
()

Returns the server's certificate chain, which was established as
part of defining the session in the original connection that
retrieved the network resource, from cache. Note: This method
can be used only when using certificate-based cipher suites;
using it with non-certificate-based cipher suites, such as
Kerberos, will throw an SSLPeerUnverifiedException.

##### Returns

- an immutable List of Certificate representing the server's certificate chain.

##### Throws

| [SSLPeerUnverifiedException](https://developers.google.com/j2objc/javadoc/jre/reference/javax/net/ssl/SSLPeerUnverifiedException.html) | if the peer is not verified. |
|---|---|

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/java/net/SecureCacheResponse.html#getPeerPrincipal()`