com.softwareag.tamino.db.api.response
Class TResponseInfoContentImpl

java.lang.Object
  extended by com.softwareag.tamino.db.api.response.TResponseInfoContentImpl
All Implemented Interfaces:
TResponseContent, TResponseInfoContent

public class TResponseInfoContentImpl
extends java.lang.Object
implements TResponseInfoContent

TResponseInfoImpl is the implementation class for TResponseInfo.

Version:
$Revision: 1.7 $
Author:
Marcus Schreyer

Constructor Summary
TResponseInfoContentImpl()
          Default initialization.
 
Method Summary
 void clear()
          Clears the entire information content that is given up to the current time.
 java.util.Collection getHeaderFieldKeys()
          Gets all keys for the header contained within the response message obtained from Tamino.
 java.lang.String getHeaderFieldValue(java.lang.String key)
          Gets a specific header value for the specified header key.
 TResponseContentItem getItem(int index, java.lang.String specifier)
          Gets the TResponseInfoItem instance that matches the given specifier with the given index.
 int getItemSize(java.lang.String specifier)
          Returns the number of response content items that have been put into the info content for the given specifier.
 boolean hasItem(java.lang.String specifier)
          Indicates if a TResultStateItem given by the specifier is contained within the result state.
 void putItem(java.lang.String specifier, TResponseContentItem responseContentItem)
          Puts the given TResponseContentItem with the given specifier to this info content.
 void setHeader(TStreamHeader header)
          Sets a new header represented by the given TStreamHeader instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TResponseInfoContentImpl

public TResponseInfoContentImpl()
Default initialization.

Method Detail

setHeader

public void setHeader(TStreamHeader header)
Sets a new header represented by the given TStreamHeader instance.

Specified by:
setHeader in interface TResponseInfoContent
Parameters:
header - the new headers.

getHeaderFieldKeys

public java.util.Collection getHeaderFieldKeys()
Gets all keys for the header contained within the response message obtained from Tamino.

Specified by:
getHeaderFieldKeys in interface TResponseInfoContent
Returns:
Collection with the header field keys.

getHeaderFieldValue

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

Specified by:
getHeaderFieldValue in interface TResponseInfoContent
Returns:
The header field value for the specified key.

putItem

public void putItem(java.lang.String specifier,
                    TResponseContentItem responseContentItem)
Puts the given TResponseContentItem with the given specifier to this info content. If this one is already given nothing happens.

Specified by:
putItem in interface TResponseInfoContent
Parameters:
specifier - specifies the concrete result state item.
responseContentItem - is the item to be inserted.

getItem

public TResponseContentItem getItem(int index,
                                    java.lang.String specifier)
Gets the TResponseInfoItem instance that matches the given specifier with the given index. If it is not given, null is returned.

Specified by:
getItem in interface TResponseInfoContent
Returns:
The response content item instance if given, null otherwise.

getItemSize

public int getItemSize(java.lang.String specifier)
Returns the number of response content items that have been put into the info content for the given specifier.

Specified by:
getItemSize in interface TResponseInfoContent
Parameters:
specifier - identifies the specific content item for which the capacity is requested.
Returns:
the number of given content items if existant, 0 otherwise.

clear

public void clear()
Clears the entire information content that is given up to the current time.

Specified by:
clear in interface TResponseInfoContent

hasItem

public boolean hasItem(java.lang.String specifier)
Indicates if a TResultStateItem given by the specifier is contained within the result state.

Specified by:
hasItem in interface TResponseInfoContent
Returns:
true if the specified item exists, false otherwise.


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