public class JoltSessionAttributes
extends java.lang.Object
JoltSession
Modifier and Type | Field and Description |
---|---|
static int |
ANY
The connection mode of ANY is equivalent to either RECONNECT
or RETAINED.
|
static java.lang.String |
APPADDRESS
Attribute name, used with setString(), for application addresses
in "//host:port" string format.
|
static int |
APPASSWORD
Authentication level: System authentication is required.
|
static java.lang.String |
AUTHLEVEL
Attribute name for authentication level.
|
static int |
CLIENT_VERSION
Current Jolt class library version.
|
static java.lang.String |
CONNECTIONMODE
Attribute name for connection mode allowed by the Jolt Server.
|
static java.lang.String |
IDLETIMEOUT
Attribute name for network idle timeout (in seconds),
used with setInt().
|
static java.lang.String |
JOLTVERSION
Attribute name for Jolt server version.
|
static java.lang.String |
KEYPASSPHRASE
Attribute name, used with setString(), for Key Store
private key passphrase
|
static java.lang.String |
KEYSTORE
Attribute name, used with setString(), for client Key Store
A file or storage facility for client private key and
X.509 Certificate
|
static java.lang.String |
KSPASSPHRASE
Attribute name, used with setString(), for Key Store
passphrase
|
static int |
NOAUTH
Authentication level: No authentication is required to access
the system.
|
static int |
RECONNECT
The connection mode of RECONNECT means the client establishes
a transient connection, brings it down when an idle timeout
is reached, and reconnects for new requests within a session.
|
static java.lang.String |
RECVTIMEOUT
Attribute name for network receive timeout (in seconds),
used with setInt().
|
static int |
RETAINED
The connection mode of RETAINED means a client must maintain a
network connection with the Jolt Server throughout the session.
|
static java.lang.String |
SENDTIMEOUT
Attribute name for network send timeout (in seconds),
used with setInt().
|
static java.lang.String |
SESSIONTIMEOUT
Attribute name for Jolt Server session timeout in seconds
(-T option in JSL).
|
static java.lang.String |
TRUSTSTORE
Attribute name, used with setString(), for Trust Store
A file or storage facility for trusted X.509 certificates and
CA X.509 Certificates
|
static java.lang.String |
TSPASSPHRASE
Attribute name, used with setString(), for Trust Store
passphrase
|
static java.lang.String |
TUXVERSION
Deprecated.
|
static int |
USRPASSWORD
Authentication level: System authentication is required.
|
static java.lang.String |
VERSION
Current Jolt class library version in string format.
|
Constructor and Description |
---|
JoltSessionAttributes()
The constructor resets all the attributes to their initial
values.
|
Modifier and Type | Method and Description |
---|---|
int |
checkAuthenticationLevel()
Determine the authentication level set up by the administrator.
|
void |
clear()
This method clears all the attributes and resets the send
timeout and receive timeout to their default values.
|
byte |
getByteDef(java.lang.String key,
byte defaultValue)
Get the byte (8-bit) value of an attribute.
|
byte[] |
getBytesDef(java.lang.String key,
byte[] defaultValue)
Get the byte-array value of the first item specified for an
attribute.
|
double |
getDoubleDef(java.lang.String key,
double defaultValue)
Get the double precision (64-bit) value of an attribute.
|
float |
getFloatDef(java.lang.String key,
float defaultValue)
Get the floating point (32-bit) value of an attribute.
|
int |
getIntDef(java.lang.String key,
int defaultValue)
Get the integer (32-bit) value of an attribute.
|
java.util.Enumeration |
getKeys()
Enumerate the attribute names.
|
short |
getShortDef(java.lang.String key,
short defaultValue)
Get the short integer (16-bit) value of an attribute.
|
java.lang.String |
getStringDef(java.lang.String key,
java.lang.String defaultValue)
Get the string value of an attribute.
|
java.lang.String |
JoltClientVersion() |
void |
setByte(java.lang.String key,
byte value)
Set the value of the attribute named in the key parameter
to the byte (8-bit) value specified in the value parameter.
|
void |
setBytes(java.lang.String key,
byte[] value,
int len)
Set the value of the attribute named in the key parameter
to the byte-array value specified in the value parameter.
|
void |
setDouble(java.lang.String key,
double value)
Set the value of the attribute named in the key parameter
to the double precision (64-bit) value specified in the value
parameter.
|
void |
setFloat(java.lang.String key,
float value)
Set the value of the attribute named in the key parameter
to the floating point (32-bit) value specified in the value
parameter.
|
void |
setInt(java.lang.String key,
int value)
Set the value of the attribute named in the key parameter
to the integer (16-bit) value specified in the value parameter.
|
void |
setShort(java.lang.String key,
short value)
Set the value of the attribute named in the key parameter
to the short integer (16-bit) value specified in the value
parameter.
|
void |
setString(java.lang.String key,
java.lang.String value)
Set the value of the attribute named in the key parameter
to the string value specified in the value parameter.
|
public static final int NOAUTH
public static final int APPASSWORD
public static final int USRPASSWORD
public static final java.lang.String APPADDRESS
public static final java.lang.String IDLETIMEOUT
public static final java.lang.String SENDTIMEOUT
public static final java.lang.String RECVTIMEOUT
public static final java.lang.String KEYSTORE
public static final java.lang.String TRUSTSTORE
public static final java.lang.String KEYPASSPHRASE
public static final java.lang.String KSPASSPHRASE
public static final java.lang.String TSPASSPHRASE
public static final java.lang.String JOLTVERSION
getIntDef(String, int)
,
Constant Field Valuespublic static final java.lang.String TUXVERSION
getIntDef(String, int)
,
Constant Field Valuespublic static final java.lang.String AUTHLEVEL
getIntDef(String, int)
,
Constant Field Valuespublic static final java.lang.String SESSIONTIMEOUT
getIntDef(String, int)
,
Constant Field Valuespublic static final java.lang.String CONNECTIONMODE
getIntDef(String, int)
,
Constant Field Valuespublic static final int ANY
public static final int RETAINED
public static final int RECONNECT
public static final int CLIENT_VERSION
public static final java.lang.String VERSION
public JoltSessionAttributes()
public void clear()
public byte getByteDef(java.lang.String key, byte defaultValue)
key
- The attribute name.defaultValue
- The default value to be returned.public short getShortDef(java.lang.String key, short defaultValue)
key
- The attribute name.defaultValue
- The default value to be returned.public int getIntDef(java.lang.String key, int defaultValue)
key
- The attribute name.defaultValue
- The default value to be returned.public float getFloatDef(java.lang.String key, float defaultValue)
key
- The attribute name.defaultValue
- The default value to be returned.public double getDoubleDef(java.lang.String key, double defaultValue)
key
- The attribute name.defaultValue
- The default value to be returned.public java.lang.String getStringDef(java.lang.String key, java.lang.String defaultValue)
key
- The attribute name.defaultValue
- The default value to be returned.public byte[] getBytesDef(java.lang.String key, byte[] defaultValue)
key
- The attribute name.defaultValue
- The default value to be returned.public void setByte(java.lang.String key, byte value)
key
- The attribute name.value
- The byte value.java.lang.IllegalAccessError
- This attribute is not settable.public void setShort(java.lang.String key, short value)
key
- The attribute name.value
- The short value.java.lang.IllegalAccessError
- This attribute is not settable.public void setInt(java.lang.String key, int value)
key
- The attribute name.value
- The int valuejava.lang.IllegalAccessError
- This attribute is not settable.public void setFloat(java.lang.String key, float value)
key
- The attribute name.value
- The float value.java.lang.IllegalAccessError
- This attribute is not settable.public void setDouble(java.lang.String key, double value)
key
- The attribute name.value
- The double value.java.lang.IllegalAccessError
- This attribute is not settable.public void setString(java.lang.String key, java.lang.String value)
key
- the attribute name.value
- the string value.java.lang.IllegalAccessError
- This attribute is not settable.public void setBytes(java.lang.String key, byte[] value, int len)
key
- The attribute name.value
- The byte-array value.len
- The length of byte-array.java.lang.IllegalAccessError
- This attribute is not settable.public java.util.Enumeration getKeys()
public int checkAuthenticationLevel() throws SessionException
SessionException
- The APPADDRESS is not specified or it
contains an invalid host and port.public java.lang.String JoltClientVersion()