All Packages Class Hierarchy This Package Previous Next Index
Class bea.jolt.JoltSession
java.lang.Object
|
+----bea.jolt.Session
|
+----bea.jolt.JoltSession
- public class JoltSession
- extends Session
- implements SessionState
The JoltSession class represents the logon session object and is
used to access available TUXEDO services. The GUI-based Contract Repository
handles the propagation of TUXEDO services to Jolt client applications.
(For more information about the Contract Repository, see the
BEA Jolt Developer's Guide. You must instantiate an object for
each logon session. The JoltSession object communicates data from, and
connects to the TUXEDO System. The session ends with a call using the
endSession() method. The JoltSession object is passed,
by reference, to the JoltRemoteService and JoltTransaction
objects. All Jolt transactions must pass a JoltSession to access
the TUXEDO application.
- See Also:
- JoltSessionAttributes, JoltRemoteService, JoltTransaction, JoltReply, JoltRepository
-
JoltSession(JoltSessionAttributes, String, String, String, String)
- The JoltSession constructor creates a JoltSession
object with attributes from the JoltSessionAttributes
class.
-
endSession()
- The endSession method terminates the session and obsoletes
the session object.
-
getRepository()
- Get the client repository that caches service definitions.
-
isAlive()
- The isAlive method returns a Boolean (true/false) value indicating
whether the client session is valid or not.
-
onDisconnect()
- Default event handler for the loss of network connection.
-
onReply(JoltReply)
- The onReply method is the default event handler for all events.
JoltSession
public JoltSession(JoltSessionAttributes attr,
String userName,
String userRole,
String userPassword,
String appPassword) throws SessionException
- The JoltSession constructor creates a JoltSession
object with attributes from the JoltSessionAttributes
class. The JoltSession object is the logon to the target
system identified in the APPADDRESS name of the
JoltSessionAttributes. In addition,
you can specify the IDLETIMEOUT value (in seconds) in
JoltSessionAttributes to hint to the system when to drop the
network connection while retaining the session. A value of 0 means
the network connection should be retained throughout the session.
The administrator can override the behavior.
You can set all other parameters for this constructor to null,
depending upon the authentication level.
The JoltSession constructor creates an instance of the
JoltSession
class with the specified attributes. The constructor extracts
specific components to assist in joining an application and
terminating a session. The JoltSession constructor allows
the user identified by the userName parameter to log on to
the Jolt/TUXEDO system. All parameters must be set according to the
authentication level. If the logon is not successful, a
SessionException is thrown. The object is returned upon
completion.
- Parameters:
- attr - The session attributes.
- userName - The user name or null.
- userRole - The user role or null.
- userPassword - The user password or null.
- appPassword - The application password or null.
- Throws: SessionException
- An exception thrown if one of the
session attributes is invalid or the authentication fails.
endSession
public void endSession() throws SessionException
- The endSession method terminates the session and obsoletes
the session object. The endSession method allows the user
to log off the Jolt/TUXEDO system. When the user is logged off, the
session is invalid.
- Throws: SessionException
- Session was not ended gracefully,
forced shutdown was used.
- Overrides:
- endSession in class Session
isAlive
public boolean isAlive()
- The isAlive method returns a Boolean (true/false) value indicating
whether the client session is valid or not. The validity of the
client session is checked at the Jolt Session Handler (JSH). If a
client operating in connectionless mode calls isAlive while its
network connection is closed, this method causes the network
connection to be reopened and closed.
- Returns:
- true if this session is still alive; false otherwise.
onReply
public void onReply(JoltReply reply)
- The onReply method is the default event handler for all events.
This method is invoked by Jolt applications and it should be
overridden by the user. Client application developers should
provide an implementation of the onReply method to invoke
when any notification is received. The onReply object that is
passed to the onReply() method contains any data that is included
with the notification. The application can use the methods in
JoltReply and JoltMessage to retrieve this data.
Since Jolt is a multithreaded environment, the onReply method
executes on a separate thread simultaneously with other application
threads. You must, therefore, write a thread-safe handler.
Separate threads could be executing the onReply method
concurrently, so you must write the method to accommodate this
possibility. Alternatively, you can declare the onReply method
as synchronized--this causes all its invocations to be serialized.
- Parameters:
- reply - Specifies an object containing the data message.
- Overrides:
- onReply in class Session
onDisconnect
public void onDisconnect()
- Default event handler for the loss of network connection.
This method should be overridden by the user.
getRepository
public JoltRepository getRepository()
- Get the client repository that caches service definitions.
All Packages Class Hierarchy This Package Previous Next Index