toolbox.oracle.siebel.session.client
Class SessionTokenClient

java.lang.Object
  extended by toolbox.oracle.siebel.session.client.SessionTokenClient

public class SessionTokenClient
extends java.lang.Object

Simple class that can be used to obtain and release session tokens.

Author:
Hannes Holtzhausen

Method Summary
static java.util.Map getToken(java.lang.String poolName)
          Return a token and the pool status from the named pool.
static void main(java.lang.String[] args)
          Main method to test the client from a standalone JVM.
static java.lang.String releaseToken(java.lang.String poolName, java.lang.String leasedToken, java.lang.String reissuedToken)
          Release a token back to the named pool and return a the status of pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getToken

public static java.util.Map getToken(java.lang.String poolName)
                              throws SessionTokenClientException
Return a token and the pool status from the named pool.

Parameters:
poolName - String containing the pool name.
Returns:
Map instance containing the token and status message.
Throws:
SessionTokenClientException - if the token cannot be returned.

releaseToken

public static java.lang.String releaseToken(java.lang.String poolName,
                                            java.lang.String leasedToken,
                                            java.lang.String reissuedToken)
                                     throws SessionTokenClientException
Release a token back to the named pool and return a the status of pool.

Parameters:
poolName - String containing the pool name.
leasedToken - String containing the token that was peviously leased to the client calling this class.
reissuedToken - String containing a new value for the previously leased token. Can be null.
Returns:
String containing the status of the pool.
Throws:
SessionTokenClientException - if the token cannot be released.

main

public static void main(java.lang.String[] args)
Main method to test the client from a standalone JVM.

Parameters:
args - String[] containing the command line arguments. Only takes a pool name as input.