public interface Exchange
| Modifier and Type | Method and Description |
|---|---|
Instant |
getCreationTime()
Gets the time the
Exchange was created. |
Identity |
getIdentity()
Returns the user identity or null if no identity is associated with the Exchange.
|
String |
getOriginalRequestUri()
The Request URI provided in the Request's start line.
|
PolicyConfiguration |
getPolicyConfiguration()
Returns the
PolicyConfiguration containing details about the policy configuration for the current
Exchange |
<T> Optional<T> |
getProperty(ExchangeProperty<T> property)
Retrieves a property from this exchange.
|
Request |
getRequest()
Gets the Request Object.
|
<T> T |
getRequiredProperty(ExchangeProperty<T> property)
Retrieves a property from this exchange, throwing an unchecked exception if no value is present.
|
Locale |
getResolvedLocale()
Get the resolved Locale of the request, as determined by the
LocaleOverrideService and the request data. |
Response |
getResponse()
Gets the response.
|
String |
getSourceIp()
The source IP address for the socket over which the
Request was received. |
SslData |
getSslData()
Returns SslData from the SSL/TLS connection.
|
List<TargetHost> |
getTargetHosts() |
String |
getTargetScheme() |
String |
getUserAgentHost()
Returns the value of the Host header field from the HTTP request sent by the user agent,
as determined by the PingAccess HTTP requests configuration and the
Request data. |
String |
getUserAgentIp()
Returns the IP of the user agent, as determined by the PingAccess HTTP requests configuration and the
Request data. |
String |
getUserAgentProtocol()
|
default boolean |
isPropertyTrue(ExchangeProperty<Boolean> property)
Determines if a boolean property is set to
true. |
default void |
removeProperty(ExchangeProperty<?> property)
Removes a property from this exchange, which is equivalent to setting the property to a null value.
|
<T> void |
setProperty(ExchangeProperty<T> property,
T value)
Stores a property in this exchange.
|
void |
setRequest(Request req)
Sets the Request.
|
void |
setResponse(Response res)
|
Identity getIdentity()
IdentityRequest getRequest()
void setRequest(Request req)
req - RequestResponse getResponse()
void setResponse(Response res)
Response on this Exchange.
If a response is already set for this exchange, its body will be read/consumed and discarded.res - Response.IllegalArgumentException - if the specified Response was not created with a
ResponseBuilder provided by the SDK.
See ResponseBuilder.newInstance(HttpStatus).Instant getCreationTime()
Exchange was created.Exchange was created.<T> Optional<T> getProperty(ExchangeProperty<T> property)
T - the value type of the property to be retrievedproperty - the property (key) to be retrieved<T> T getRequiredProperty(ExchangeProperty<T> property)
T - the value type of the property to be retrievedproperty - the property (key) to be retrievedIllegalStateException - if the required property is not setdefault boolean isPropertyTrue(ExchangeProperty<Boolean> property)
true.property - the property (key) to be retrieved/checkedproperty is set and has a value of Boolean.TRUE<T> void setProperty(ExchangeProperty<T> property, T value)
T - the value type of the propertyproperty - the property (key) to be storedvalue - the property value (may be null)default void removeProperty(ExchangeProperty<?> property)
property - the property (key) to be removedString getOriginalRequestUri()
List<TargetHost> getTargetHosts()
String getTargetScheme()
String getSourceIp()
Request was received.String getUserAgentIp()
Request data.String getUserAgentHost()
Request data.
For example, if the user agent used a URL of https://example.com:8443, this method is expected to return
"example.com:8443". The actual value can vary depending on the PingAccess HTTP requests configuration.String getUserAgentProtocol()
Request, as
determined by the PingAccess HTTP requests configuration and the Request data.
For example, if the user agent used HTTPS, this method is expected to return "https". The actual value can
vary depending on the PingAccess HTTP requests configuration.Request.Locale getResolvedLocale()
LocaleOverrideService and the request data.
LocaleOverrideService.
PolicyConfiguration getPolicyConfiguration()
PolicyConfiguration containing details about the policy configuration for the current
ExchangeCopyright 2023 Ping Identity Corp. All rights reserved.