public class THTTPInvocation extends TAbstractInvocation
PROP_RETRY
Constructor and Description |
---|
THTTPInvocation(TUri databaseUri)
Initializes the instance with Tamino's database uri.
|
THTTPInvocation(TUri databaseUri,
SecurityToken token) |
THTTPInvocation(TUri databaseUri,
java.lang.String userId,
java.lang.String password)
Initializes the instance with Tamino's database uri, and a users authorization
parameters.
|
THTTPInvocation(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.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doClose()
Implements the plug in method doClose of TAbstractInvocation.
|
TInputStream |
doInvoke(TCommandStatement commandStatement,
java.lang.String collection,
java.lang.String doctype,
java.lang.String docname,
boolean useTransactionMode)
Invokes a Tamino specific command given by a TCommandStatement on an underlying Tamino database.
|
protected java.net.HttpURLConnection |
getHttpURLConnection(java.lang.String urlString)
Gets a HttpURLConnection for the specified url.
|
int |
getSocketTimeout() |
boolean |
isDisconnectAfterClose()
Get the disconnect after close flag for current connection.
|
protected void |
setAuthentication(java.net.HttpURLConnection connection)
Setting authentication to the http(s) connection.
|
void |
setDisconnectAfterClose(boolean disconnectAfterClose)
Set the status whether to disconnect after closing http stream.
|
void |
setLocale(java.util.Locale locale)
Sets the locale.
|
void |
setSocketTimeout(int timeout)
This value indicates to use Tamino default values for the timeout parameters.
|
addRetryHandler, checkServerAvailabilityAndVersion, close, getDatabaseUri, getDomain, getLastExecutedCommandStatement, getLastNonActivityTimeoutRelevantInvokeTimeMillis, getLocale, getPassword, getPooledConnectionReconnectHandler, getSecurityToken, getTransactionModeCoordinator, getUserId, invoke, invoke, invoke, isClosed, setPooledConnectionReconnectHandler, setTransactionModeCoordinator, supports, updateStreamHeader
public THTTPInvocation(TUri databaseUri, SecurityToken token)
public THTTPInvocation(TUri databaseUri, java.lang.String domain, java.lang.String userId, java.lang.String password) throws TInvocationException
databaseUri
- is the Tamino database.domain
- denotes the domain user for WWW authorization.userId
- denotes the user for WWW authorization.password
- denotes the password that is related to the given userId.TInvocationException
- is thrown if the Tamino database cannot be reached.public THTTPInvocation(TUri databaseUri, java.lang.String userId, java.lang.String password) throws TInvocationException
databaseUri
- is the Tamino database.userId
- denotes the user for WWW authorization.password
- denotes the password that is related to the given userId.TInvocationException
- is thrown if the Tamino database cannot be reached.public THTTPInvocation(TUri databaseUri) throws TInvocationException
databaseUri
- is the Tamino database.TInvocationException
- is thrown if the Tamino database cannot be reached.public TInputStream doInvoke(TCommandStatement commandStatement, java.lang.String collection, java.lang.String doctype, java.lang.String docname, boolean useTransactionMode) throws TInvocationException
doInvoke
in interface TRetryInvocation
doInvoke
in class TAbstractInvocation
commandStatement
- spcifies the concrete Tamino specific action that should be fullfilled.collection
- is the collection of the Tamino DB to which the command statement might be related to.doctype
- within a schema of the given collection to which the command statement might be related to.objectName
- is the name of the object to which the command statement might be related to.useTransactionMode
- specifies whether the transaction mode shall be considered.TInvocationException
- due to any problems that can occur when performing the
invocation on Tamino.protected void doClose()
doClose
in class TAbstractInvocation
protected java.net.HttpURLConnection getHttpURLConnection(java.lang.String urlString) throws TCommunicationException
TCommunicationException
protected void setAuthentication(java.net.HttpURLConnection connection) throws TInvocationException
connection
- the http(s) connectionTInvocationException
public void setLocale(java.util.Locale locale)
TAbstractInvocation
setLocale
in interface TInvocation
setLocale
in class TAbstractInvocation
public void setDisconnectAfterClose(boolean disconnectAfterClose)
disconnectAfterClose
- true: grant disconnect for this connection - false: do not disconnect this connectionpublic boolean isDisconnectAfterClose()
public int getSocketTimeout()
public void setSocketTimeout(int timeout)
TInvocation
Copyright (c) 2017 Software AG. All Rights Reserved.