Class SessionContextSettings
- java.lang.Object
-
- net.webpdf.wsclient.session.connection.SessionContextSettings
-
public class SessionContextSettings extends Object
An instance of
SessionContextSettingscollects and provides advanced settings for a webPDFSession. During it´s existence aSessionwill obey those settings, when making requests to a webPDF server.
Be aware:SessionContextSettingscan not be changed post initialization. If you want to make such changes, you have to create a newSessionusing theSessionContextof your choice.Be aware: A
SessionContextSettingsis not required to serve multipleSessions at a time. It is expected to create a newSessionContextSettingsfor each existingSession.
-
-
Constructor Summary
Constructors Constructor Description SessionContextSettings(@NotNull SessionContext contextConfiguration)Creates a newSessionContextSettingsfrom the providedSessionContext.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable ProxyConfigurationgetProxy()Returns theProxyConfigurationforSessions.
AProxyConfigurationallows to route requests to the server via the defined proxy.intgetSkewTime()Returns a skew time for the token refresh ofSessions.
The skew time helps to avoid using expired authorization tokens.@Nullable TLSContextgetTlsContext()Returns theTLSContextforSessions.
ATLSContextallows to send requests to the server via secured HTTPS connections.@NotNull URLgetUrl()Returns theURLof the server.@NotNull WebServiceProtocolgetWebServiceProtocol()Returns theWebServiceProtocol, that shall be used to communicate with the server.
-
-
-
Constructor Detail
-
SessionContextSettings
public SessionContextSettings(@NotNull @NotNull SessionContext contextConfiguration)Creates a newSessionContextSettingsfrom the providedSessionContext. During it´s existence aSessionwill obey those settings, when making requests to a webPDF server.
Be aware: ASessionContextSettingscan not be changed post initialization. You must use aSessionContextinstance prior to theSessioninitialization, to manipulate those settings.- Parameters:
contextConfiguration- TheSessionContextinitializing thisSessionContextSettings.
-
-
Method Detail
-
getWebServiceProtocol
@NotNull public @NotNull WebServiceProtocol getWebServiceProtocol()
Returns theWebServiceProtocol, that shall be used to communicate with the server.- Returns:
- The
WebServiceProtocol, that shall be used to communicate with the server.
-
getUrl
@NotNull public @NotNull URL getUrl()
Returns theURLof the server.- Returns:
- The
URLof the server.
-
getTlsContext
@Nullable public @Nullable TLSContext getTlsContext()
Returns the
TLSContextforSessions.
ATLSContextallows to send requests to the server via secured HTTPS connections.- Returns:
- The
TLSContext, that shall be used.
-
getProxy
@Nullable public @Nullable ProxyConfiguration getProxy()
Returns the
ProxyConfigurationforSessions.
AProxyConfigurationallows to route requests to the server via the defined proxy.- Returns:
- The
ProxyConfiguration, that shall be used.
-
getSkewTime
public int getSkewTime()
Returns a skew time for the token refresh of
Sessions.
The skew time helps to avoid using expired authorization tokens. The returned value (in seconds) is subtracted from the expiry time to avoid issues possibly caused by transfer delays.
It can not be guaranteed, but is recommended, that custom implementations ofAuthProviderhandle this accordingly.- Returns:
- The skew time in seconds, that shall be used.
-
-