toolbox.oracle.siebel.session
Class SessionTokenConfig

java.lang.Object
  extended by toolbox.oracle.siebel.session.SessionTokenConfig

public class SessionTokenConfig
extends java.lang.Object

Encapsulates the configuration required to establish a stateless session with Oracle Siebel. The class provides access to the configuration parameters specified in XML or provided via the setter methods.

The class also provide methods to create and destroy authentication tokens.

Author:
Hannes Holtzhausen

Constructor Summary
SessionTokenConfig()
          Default constructor.
SessionTokenConfig(java.lang.String name, toolbox.allegato.XMLProperties xmlProps)
          Initialises this config object with the given XML configuration.
 
Method Summary
 Token createSessionToken()
          Authenticate against Oracle Siebel and return a Token instance.
 void destroySessionToken(Token token)
          Destroy the provided token.
 java.lang.String getContentType()
          Returns the contentType property.
 java.lang.String getCreateEnvelope()
          Returns the create envelope property.
 java.lang.String getDestroyEnvelope()
          Returns the destroy envelope property.
 java.lang.String getHeaderElement()
          Returns the headerElement property.
 java.lang.String getHost()
          Returns the host property.
 java.lang.String getNamespace()
          Returns the namespace property.
 java.lang.String getPort()
          Returns the port property.
 java.lang.String getProtocol()
          Returns the protocol property.
 java.lang.String getSOAPAction()
          Returns the SOAPAction property.
 java.lang.String getUri()
          Returns the uri property.
 void setContentType(java.lang.String contentType)
          Set the contentType property.
 void setCreateEnvelope(java.lang.String envelope)
          Set the create envelope property.
 void setDestroyEnvelope(java.lang.String envelope)
          Set the destroy envelope property.
 void setHeaderElement(java.lang.String headerElement)
          Set the headerElement property.
 void setHost(java.lang.String host)
          Set the host property.
 void setNamespace(java.lang.String namespace)
          Set the namespace property.
 void setPort(java.lang.String port)
          Set the port property.
 void setProtocol(java.lang.String protocol)
          Set the protocol property.
 void setSOAPAction(java.lang.String soapAction)
          Set the SOAPAction property.
 void setUri(java.lang.String uri)
          Set the uri property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionTokenConfig

public SessionTokenConfig()
Default constructor.


SessionTokenConfig

public SessionTokenConfig(java.lang.String name,
                          toolbox.allegato.XMLProperties xmlProps)
                   throws toolbox.allegato.ConfException
Initialises this config object with the given XML configuration.

Parameters:
name - The name of the configuration instance.
xmlProps - XML configuration properties containing a valid SiebelSessionConfig element.
Throws:
toolbox.allegato.ConfException - if this object cannot be initialised.
Method Detail

setProtocol

public void setProtocol(java.lang.String protocol)
Set the protocol property.

Parameters:
protocol - String containing the protocol to use.

getProtocol

public java.lang.String getProtocol()
Returns the protocol property.

Returns:
String containing the protocol property.

setHost

public void setHost(java.lang.String host)
Set the host property.

Parameters:
host - String containing the host to use.

getHost

public java.lang.String getHost()
Returns the host property.

Returns:
String containing the host property.

setPort

public void setPort(java.lang.String port)
Set the port property.

Parameters:
port - String containing the port to use.

getPort

public java.lang.String getPort()
Returns the port property.

Returns:
String containing the port property.

setUri

public void setUri(java.lang.String uri)
Set the uri property.

Parameters:
uri - String containing the uri to use.

getUri

public java.lang.String getUri()
Returns the uri property.

Returns:
String containing the uri property.

setContentType

public void setContentType(java.lang.String contentType)
Set the contentType property.

Parameters:
contentType - String containing the contentType to use.

getContentType

public java.lang.String getContentType()
Returns the contentType property.

Returns:
String containing the contentType property.

setNamespace

public void setNamespace(java.lang.String namespace)
Set the namespace property.

Parameters:
namespace - String containing the namespace to use.

getNamespace

public java.lang.String getNamespace()
Returns the namespace property.

Returns:
String containing the namespace property.

setSOAPAction

public void setSOAPAction(java.lang.String soapAction)
Set the SOAPAction property.

Parameters:
soapAction - String containing the SOAPAction to use.

getSOAPAction

public java.lang.String getSOAPAction()
Returns the SOAPAction property.

Returns:
String containing the SOAPAction property.

setHeaderElement

public void setHeaderElement(java.lang.String headerElement)
Set the headerElement property.

Parameters:
headerElement - String containing the headerElement to use.

getHeaderElement

public java.lang.String getHeaderElement()
Returns the headerElement property.

Returns:
String containing the headerElement property.

setCreateEnvelope

public void setCreateEnvelope(java.lang.String envelope)
Set the create envelope property.

Parameters:
envelope - String containing the create envelope to use.

getCreateEnvelope

public java.lang.String getCreateEnvelope()
Returns the create envelope property.

Returns:
String containing the create envelope property.

setDestroyEnvelope

public void setDestroyEnvelope(java.lang.String envelope)
Set the destroy envelope property.

Parameters:
envelope - String containing the destroy envelope to use.

getDestroyEnvelope

public java.lang.String getDestroyEnvelope()
Returns the destroy envelope property.

Returns:
String containing the destroy envelope property.

createSessionToken

public Token createSessionToken()
                         throws java.io.IOException
Authenticate against Oracle Siebel and return a Token instance.

Returns:
Token instance.
Throws:
java.io.IOException - when a communication error occurs.

destroySessionToken

public void destroySessionToken(Token token)
                         throws java.io.IOException
Destroy the provided token.

Parameters:
token - Token instance that must be destroyed.
Throws:
java.io.IOException