com.softwareag.tamino.db.api.invocation.wsl
Class TWSLInvocation

java.lang.Object
  extended by com.softwareag.tamino.db.api.invocation.TAbstractInvocation
      extended by com.softwareag.tamino.db.api.invocation.wsl.TWSLInvocation
All Implemented Interfaces:
TInvocation, TRetryInvocation

public class TWSLInvocation
extends TAbstractInvocation

TWSLInvocation establishes a connection to Tamino either via GET or POST method.

Version:
$Revision: 1.21 $
Author:
Gerald Ristow

Field Summary
 
Fields inherited from class com.softwareag.tamino.db.api.invocation.TAbstractInvocation
PROP_RETRY
 
Constructor Summary
TWSLInvocation(TUri databaseUri)
          Initializes the instance with Tamino's database uri.
TWSLInvocation(TUri databaseUri, SecurityToken token)
          Initializes the instance with Tamino's database uri.
TWSLInvocation(TUri databaseUri, java.lang.String userId, java.lang.String password)
          Initializes the instance with Tamino's database uri, and a users authorization parameters.
TWSLInvocation(TUri databaseUri, java.lang.String domain, java.lang.String userId, java.lang.String password)
          Initializes the instance with Tamino's database uri, and a users authorization parameters.
 
Method Summary
protected  void doClose()
          Plug in method for closing the invocation connection.
 TInputStream doInvoke(TCommandStatement commandStatement, java.lang.String collection, java.lang.String doctype, java.lang.String docname, boolean useTransactionMode)
          Invokes a specific command given by a TCommandStatement on an underlying Tamino database.
 int getSocketTimeout()
           
 void setSocketTimeout(int timeout)
          This value indicates to use Tamino default values for the timeout parameters.
 
Methods inherited from class com.softwareag.tamino.db.api.invocation.TAbstractInvocation
addRetryHandler, checkServerAvailabilityAndVersion, close, getDatabaseUri, getDomain, getLastExecutedCommandStatement, getLastNonActivityTimeoutRelevantInvokeTimeMillis, getLocale, getPassword, getPooledConnectionReconnectHandler, getSecurityToken, getTransactionModeCoordinator, getUserId, invoke, invoke, invoke, isClosed, setLocale, setPooledConnectionReconnectHandler, setTransactionModeCoordinator, supports, updateStreamHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TWSLInvocation

public TWSLInvocation(TUri databaseUri,
                      java.lang.String domain,
                      java.lang.String userId,
                      java.lang.String password)
               throws TInvocationException
Initializes the instance with Tamino's database uri, and a users authorization parameters.

Parameters:
databaseUri - is the Tamino database name.
domain - denotes the domain user for WWW authorization.
userId - is the user ID.
password - is the password.
Throws:
TInvocationException - is thrown if the Tamino database cannot be reached.

TWSLInvocation

public TWSLInvocation(TUri databaseUri,
                      java.lang.String userId,
                      java.lang.String password)
               throws TInvocationException
Initializes the instance with Tamino's database uri, and a users authorization parameters.

Parameters:
databaseUri - is the Tamino database.
userId - denotes the user for WWW authorization.
password - denotes the password that is related to the given userId.
Throws:
TInvocationException - is thrown if the Tamino database cannot be reached.

TWSLInvocation

public TWSLInvocation(TUri databaseUri)
               throws TInvocationException
Initializes the instance with Tamino's database uri. Please note that an invocation cannot be used for invocations that require a www authorization.

Parameters:
databaseUri - is the Tamino database name.
Throws:
TInvocationException - due to any problems that can occur when performing the invocation on Tamino.

TWSLInvocation

public TWSLInvocation(TUri databaseUri,
                      SecurityToken token)
               throws TInvocationException
Initializes the instance with Tamino's database uri. Please note that an invocation cannot be used for invocations that require a www authorization.

Parameters:
databaseUri - is the Tamino database name.
Throws:
TInvocationException - due to any problems that can occur when performing the invocation on Tamino.
Method Detail

doClose

protected void doClose()
                throws TInvocationException
Plug in method for closing the invocation connection. Is invoked by template method close. Has to be implemented by concrete TInvocation class.

Specified by:
doClose in class TAbstractInvocation
Throws:
TInvocationException - due to any problems that can occur when performing the invocation on Tamino.

doInvoke

public TInputStream doInvoke(TCommandStatement commandStatement,
                             java.lang.String collection,
                             java.lang.String doctype,
                             java.lang.String docname,
                             boolean useTransactionMode)
                      throws TInvocationException
Invokes a specific command given by a TCommandStatement on an underlying Tamino database. This version of invoke gives more control of whether a transaction state that has been set in advance is considered for the communication with Tamino or not. The result is handed back as a TInputStream instance.

Specified by:
doInvoke in interface TRetryInvocation
Specified by:
doInvoke in class TAbstractInvocation
Parameters:
commandStatement - spcifies the concrete action that should be fullfilled.
collection - is the collection of the Tamino DB where the object is contained in.
doctype - within a schema of a collection to which the statement is related.
docname - denotes the docname under which a specific document might be accessible.
useTransactionMode - specifies whether the transaction mode shall be considered.
Returns:
TInputStream representing Tamino's response as a core input stream.
Throws:
TInvocationException - due to any problems that can occur when performing the invocation on Tamino.

getSocketTimeout

public int getSocketTimeout()

setSocketTimeout

public void setSocketTimeout(int timeout)
Description copied from interface: TInvocation
This value indicates to use Tamino default values for the timeout parameters.



Copyright (c) 2013 Software AG. All Rights Reserved.