bea.jolt
Class JoltSessionAttributes

java.lang.Object
  extended bybea.jolt.JoltSessionAttributes

public class JoltSessionAttributes
extends java.lang.Object

The JoltSessionAttributes class defines the set of attributes that the JoltSession constructor accepts. The set and get (for example, setByte, setInt, getByte, getInt) methods set and get various attributes. A set method adds an attribute if it does not exist; otherwise, the set method overwrites the old value. The set and get methods throw the java.lang.NoSuchFieldError or java.lang.IllegalAccessError. By default, these errors are caught by the Java virtual machine.

See Also:
JoltSession

Field Summary
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 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 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 Summary
JoltSessionAttributes()
          The constructor resets all the attributes to their initial values.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NOAUTH

public static final int NOAUTH
Authentication level: No authentication is required to access the system.

See Also:
Constant Field Values

APPASSWORD

public static final int APPASSWORD
Authentication level: System authentication is required. Clients must provide a user name, a user role, and an application password to access the system.

See Also:
Constant Field Values

USRPASSWORD

public static final int USRPASSWORD
Authentication level: System authentication is required. Clients must provide a user password in addition to the user name, user role, and application password to access the system.

See Also:
Constant Field Values

APPADDRESS

public static final java.lang.String APPADDRESS
Attribute name, used with setString(), for application addresses in "//host:port" string format. If multiple addresses are specified, the addresses must be separated by commas. The host can be a machine name or Internet Address (x.x.x.x). The port must be a numeric value between 1 and 65535. If multiple addresses are specified, a random address is chosen from the address list.

See Also:
setString(String, String), getStringDef(String, String), Constant Field Values

IDLETIMEOUT

public static final java.lang.String IDLETIMEOUT
Attribute name for network idle timeout (in seconds), used with setInt(). If 0 is specified, the Jolt client attempts to connect the Jolt Server Handler in RETAINED mode. If > 0 is specified, the Jolt client attempts to connect JSH in RECONNECT mode.

See Also:
setInt(String, int), getIntDef(String, int), Constant Field Values

SENDTIMEOUT

public static final java.lang.String SENDTIMEOUT
Attribute name for network send timeout (in seconds), used with setInt(). If the data cannot be sent to the network within this amount of time, an exception is generated.

See Also:
setInt(String, int), getIntDef(String, int), Constant Field Values

RECVTIMEOUT

public static final java.lang.String RECVTIMEOUT
Attribute name for network receive timeout (in seconds), used with setInt(). If the expected network data is not received within this amount of time, an exception is generated.

See Also:
setInt(String, int), getIntDef(String, int), Constant Field Values

JOLTVERSION

public static final java.lang.String JOLTVERSION
Attribute name for Jolt server version. Current version is 2000.

See Also:
getIntDef(String, int), Constant Field Values

TUXVERSION

public static final java.lang.String TUXVERSION
Deprecated.  

Attribute name for Tuxedo version. Current supported versions are 6400 (Tuxedo 6.4) and 6500 (Tuxedo 6.5).

See Also:
getIntDef(String, int), Constant Field Values

AUTHLEVEL

public static final java.lang.String AUTHLEVEL
Attribute name for authentication level. Permitted values: NOAUTH, APPASSWORD, or USRPASSWORD.

See Also:
getIntDef(String, int), Constant Field Values

SESSIONTIMEOUT

public static final java.lang.String SESSIONTIMEOUT
Attribute name for Jolt Server session timeout in seconds (-T option in JSL).

See Also:
getIntDef(String, int), Constant Field Values

CONNECTIONMODE

public static final java.lang.String CONNECTIONMODE
Attribute name for connection mode allowed by the Jolt Server. See the -c option of JSL, as described in the BEA Jolt 1.2 Installation and Configuration Guide. Possible values for this attribute are: ANY, RECONNECT, or RETAINED.

See Also:
getIntDef(String, int), Constant Field Values

ANY

public static final int ANY
The connection mode of ANY is equivalent to either RECONNECT or RETAINED.

See Also:
Constant Field Values

RETAINED

public static final int RETAINED
The connection mode of RETAINED means a client must maintain a network connection with the Jolt Server throughout the session.

See Also:
Constant Field Values

RECONNECT

public static final 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.

See Also:
Constant Field Values

CLIENT_VERSION

public static final int CLIENT_VERSION
Current Jolt class library version.

See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
Current Jolt class library version in string format. The string is suitable for display.

See Also:
Constant Field Values
Constructor Detail

JoltSessionAttributes

public JoltSessionAttributes()
The constructor resets all the attributes to their initial values. It sets the default send timeout to 10 seconds, and the receive timeout to 2 minutes.

Method Detail

clear

public void clear()
This method clears all the attributes and resets the send timeout and receive timeout to their default values.


getByteDef

public byte getByteDef(java.lang.String key,
                       byte defaultValue)
Get the byte (8-bit) value of an attribute. If the attribute does not exist, the default value is returned.

Parameters:
key - The attribute name.
defaultValue - The default value to be returned.
Returns:
The byte value.

getShortDef

public short getShortDef(java.lang.String key,
                         short defaultValue)
Get the short integer (16-bit) value of an attribute. If the attribute does not exist, the default value is returned.

Parameters:
key - The attribute name.
defaultValue - The default value to be returned.
Returns:
The short value.

getIntDef

public int getIntDef(java.lang.String key,
                     int defaultValue)
Get the integer (32-bit) value of an attribute. If the attribute does not exist, the default value is returned.

Parameters:
key - The attribute name.
defaultValue - The default value to be returned.
Returns:
The int value.

getFloatDef

public float getFloatDef(java.lang.String key,
                         float defaultValue)
Get the floating point (32-bit) value of an attribute. If the attribute does not exist, the default value is returned.

Parameters:
key - The attribute name.
defaultValue - The default value to be returned.
Returns:
The float value.

getDoubleDef

public double getDoubleDef(java.lang.String key,
                           double defaultValue)
Get the double precision (64-bit) value of an attribute. If the attribute does not exist, the default value is returned.

Parameters:
key - The attribute name.
defaultValue - The default value to be returned.
Returns:
The double value.

getStringDef

public java.lang.String getStringDef(java.lang.String key,
                                     java.lang.String defaultValue)
Get the string value of an attribute. If the attribute does not exist, the default value is returned.

Parameters:
key - The attribute name.
defaultValue - The default value to be returned.
Returns:
The string value.

getBytesDef

public byte[] getBytesDef(java.lang.String key,
                          byte[] defaultValue)
Get the byte-array value of the first item specified for an attribute. If the attribute does not exist, the default value is returned.

Parameters:
key - The attribute name.
defaultValue - The default value to be returned.
Returns:
The byte-array value.

setByte

public 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. If the attribute already exists, it is overwritten.

Parameters:
key - The attribute name.
value - The byte value.
Throws:
java.lang.IllegalAccessError - This attribute is not settable.

setShort

public 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. If the attribute already exists, it is overwritten.

Parameters:
key - The attribute name.
value - The short value.
Throws:
java.lang.IllegalAccessError - This attribute is not settable.

setInt

public 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. If the attribute already exists, it is overwritten.

Parameters:
key - The attribute name.
value - The int value
Throws:
java.lang.IllegalAccessError - This attribute is not settable.

setFloat

public 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. If the attribute already exists, it is overwritten.

Parameters:
key - The attribute name.
value - The float value.
Throws:
java.lang.IllegalAccessError - This attribute is not settable.

setDouble

public 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. If the attribute already exists, it is overwritten.

Parameters:
key - The attribute name.
value - The double value.
Throws:
java.lang.IllegalAccessError - This attribute is not settable.

setString

public 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. If the attribute already exists, it is overwritten.

Parameters:
key - the attribute name.
value - the string value.
Throws:
java.lang.IllegalAccessError - This attribute is not settable.

setBytes

public 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. If the attribute already exists, it is overwritten.

Parameters:
key - The attribute name.
value - The byte-array value.
len - The length of byte-array.
Throws:
java.lang.IllegalAccessError - This attribute is not settable.

getKeys

public java.util.Enumeration getKeys()
Enumerate the attribute names.

Returns:
The enumeration of attribute names.

checkAuthenticationLevel

public int checkAuthenticationLevel()
                             throws SessionException
Determine the authentication level set up by the administrator.

Returns:
NOAUTH, APPASSWORD or USRPASSWORD.
Throws:
SessionException - The APPADDRESS is not specified or it contains an invalid host and port.

JoltClientVersion

public java.lang.String JoltClientVersion()