com.softwareag.tamino.db.api.io
Class TStreamHeader

java.lang.Object
  extended by com.softwareag.tamino.db.api.io.TStreamHeader

public class TStreamHeader
extends java.lang.Object

TStreamHeader is an associative container for key/value pairs each of which can describe meta information of the stream this header is associated with.

Version:
$Revision: 1.17 $
Author:
Marcus Schreyer

Field Summary
static java.lang.String AUTHENTICATION_KEY
          Key that identifies the authentication key.
static java.lang.String CLIENTREQUESTID
          Key that identifies the the Tamino X-INO-clientRequestId parameter.
static java.lang.String COLLECTION
          Key that identifies the collection.
static java.lang.String DOCTYPE
          Key that identifies the schema.
static java.lang.String GROUPS
          Key that identifies the the Tamino X-INO-Groups parameter.
static java.lang.String ID
          Key that identifies the object id value key.
static java.lang.String ISOLATION_DEGREE
          Key that identifies the the Tamino _ISOLATIONLEVEL parameter.
static java.lang.String ISOLATION_LEVEL
          Key that identifies the the Tamino _ISOLATION parameter.
static java.lang.String LAST_MODIFIED
          Key that identifies the last modified time.
static java.lang.String LOCK_MODE
          Key that identifies the the Tamino _LOCKMODE parameter.
static java.lang.String LOCKWAIT_MODE
          Key that identifies the the Tamino _LOCKWAIT parameter.
static java.lang.String RESPONSE_WRAPPER
          Key that identifies the the response wrapper mode.
static java.lang.String RETURN_VALUE
          Key that identifies the return value key.
static java.lang.String SESSION_ID
          Key that identifies the session id that might have been send by Tamino within a session context.
static java.lang.String SESSION_KEY
          Key that identifies the session key that might have been send by Tamino within a session context.
static java.lang.String VERSION_KEY
          Key that identifies the version key.
 
Constructor Summary
TStreamHeader()
          Default Constructor.
 
Method Summary
 boolean containsKey(java.lang.String key)
          Indicates if the specified key is given.
 boolean containsValue(java.lang.String value)
          Indicates if the specified value is given.
 java.util.Collection<java.lang.String> getKeys()
          Gets all keys for the header contained within the response message obtained from Tamino.
 java.lang.String getValue(java.lang.String key)
          Gets a specific header value for the specified header key.
 java.lang.String getValue(java.lang.String key, java.lang.String defaultValue)
          Gets a specific header value for the specified header key.
 java.util.Collection<java.lang.String> getValues()
          Gets all values for the header contained within the response message obtained from Tamino.
 boolean hasValue(java.lang.String key)
          Tests whether a given key has a value, i.e.
 void put(java.lang.String key, java.lang.String value)
          Puts the specified key/value pair into the header.
 void remove(java.lang.String key)
          Removes the mapping for the key if present.
 void removeAdditional()
          Removes all additional headers.
 java.lang.String toString()
          Returns a string representation of this stream header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LAST_MODIFIED

public static final java.lang.String LAST_MODIFIED
Key that identifies the last modified time.

See Also:
Constant Field Values

SESSION_ID

public static final java.lang.String SESSION_ID
Key that identifies the session id that might have been send by Tamino within a session context.

See Also:
Constant Field Values

SESSION_KEY

public static final java.lang.String SESSION_KEY
Key that identifies the session key that might have been send by Tamino within a session context.

See Also:
Constant Field Values

AUTHENTICATION_KEY

public static final java.lang.String AUTHENTICATION_KEY
Key that identifies the authentication key.

See Also:
Constant Field Values

VERSION_KEY

public static final java.lang.String VERSION_KEY
Key that identifies the version key.

See Also:
Constant Field Values

RETURN_VALUE

public static final java.lang.String RETURN_VALUE
Key that identifies the return value key.

See Also:
Constant Field Values

ID

public static final java.lang.String ID
Key that identifies the object id value key.

See Also:
Constant Field Values

COLLECTION

public static final java.lang.String COLLECTION
Key that identifies the collection.

See Also:
Constant Field Values

DOCTYPE

public static final java.lang.String DOCTYPE
Key that identifies the schema.

See Also:
Constant Field Values

RESPONSE_WRAPPER

public static final java.lang.String RESPONSE_WRAPPER
Key that identifies the the response wrapper mode.

See Also:
Constant Field Values

ISOLATION_LEVEL

public static final java.lang.String ISOLATION_LEVEL
Key that identifies the the Tamino _ISOLATION parameter.

See Also:
Constant Field Values

ISOLATION_DEGREE

public static final java.lang.String ISOLATION_DEGREE
Key that identifies the the Tamino _ISOLATIONLEVEL parameter.

See Also:
Constant Field Values

LOCK_MODE

public static final java.lang.String LOCK_MODE
Key that identifies the the Tamino _LOCKMODE parameter.

See Also:
Constant Field Values

LOCKWAIT_MODE

public static final java.lang.String LOCKWAIT_MODE
Key that identifies the the Tamino _LOCKWAIT parameter.

See Also:
Constant Field Values

CLIENTREQUESTID

public static final java.lang.String CLIENTREQUESTID
Key that identifies the the Tamino X-INO-clientRequestId parameter.

See Also:
Constant Field Values

GROUPS

public static final java.lang.String GROUPS
Key that identifies the the Tamino X-INO-Groups parameter.

See Also:
Constant Field Values
Constructor Detail

TStreamHeader

public TStreamHeader()
Default Constructor.

Method Detail

put

public void put(java.lang.String key,
                java.lang.String value)
Puts the specified key/value pair into the header.


remove

public void remove(java.lang.String key)
Removes the mapping for the key if present.


removeAdditional

public void removeAdditional()
Removes all additional headers. These are all headers which are indentified by one of the keys that are defined as constant above such as X-API-Collection etc.


getKeys

public java.util.Collection<java.lang.String> getKeys()
Gets all keys for the header contained within the response message obtained from Tamino.

Returns:
Collection with the header field keys.

getValues

public java.util.Collection<java.lang.String> getValues()
Gets all values for the header contained within the response message obtained from Tamino.

Returns:
Collection with the header field values corresponding to the header field keys.

getValue

public java.lang.String getValue(java.lang.String key)
Gets a specific header value for the specified header key. If none is given null is returned.

Parameters:
key - the key to look up
Returns:
The header field value for the specified key.

getValue

public java.lang.String getValue(java.lang.String key,
                                 java.lang.String defaultValue)
Gets a specific header value for the specified header key. If none is given the defaultValue is returned.

Parameters:
key - the key to look up
defaultValue - the value returned, if nothing is found for the given key
Returns:
The header field value for the specified key.

hasValue

public boolean hasValue(java.lang.String key)
Tests whether a given key has a value, i.e. it is not null and not an empty string ("").

Parameters:
key - the key to look up
Returns:
true if a "real" value is given, otherwise false.

containsKey

public boolean containsKey(java.lang.String key)
Indicates if the specified key is given.


containsValue

public boolean containsValue(java.lang.String value)
Indicates if the specified value is given.


toString

public java.lang.String toString()
Returns a string representation of this stream header.

Overrides:
toString in class java.lang.Object


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