class WebRequestContext
extends java.lang.Object
Instances of this class are set as the FWD context ID, to identify the FWD session.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
account
The FWD account used to execute the target API, for this web request.
|
private ContextSwitcher |
contextSwitcher
The context switched used to perform the request using a specific context.
|
private long |
end
The expiration time (in millis) of this context.
|
private int |
timeout
The timeout (in seconds) of this context.
|
private java.lang.String |
token
The web service authentication token.
|
Constructor and Description |
---|
WebRequestContext(ContextSwitcher contextSwitcher,
java.lang.String token,
java.lang.String account,
int timeout)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
(package private) java.lang.String |
getAccount()
Get the
account . |
(package private) ContextSwitcher |
getContextSwitcher()
Get the
contextSwitcher . |
(package private) java.lang.String |
getToken()
Get the
token . |
(package private) boolean |
isExpired()
Check if the web request context has expired and needs to be destroyed.
|
private final ContextSwitcher contextSwitcher
private final java.lang.String token
private final java.lang.String account
private final long end
private int timeout
public WebRequestContext(ContextSwitcher contextSwitcher, java.lang.String token, java.lang.String account, int timeout)
contextSwitcher
- The context switched used to perform the request using a specific context.token
- The web service authentication token.account
- The FWD account used to execute the target API, for this web request.timeout
- The timeout of this context. If it is set to 0, it must be destroyed explicitly, via logout.ContextSwitcher getContextSwitcher()
contextSwitcher
.java.lang.String getToken()
token
.java.lang.String getAccount()
account
.boolean isExpired()
true
if timeout is not zero and the end
time has passed.