com.ibm.rational.rpe.common.utils
Class ConnectionArguments

java.lang.Object
  extended by com.ibm.rational.rpe.common.utils.ConnectionArguments

public class ConnectionArguments
extends java.lang.Object

This class models connection settings supported by Rational Reporting for Document Generation (RRDG). At this time, this class is limited to request headers.


Field Summary
static ConnectionArguments DEFAULT
          An instance of ConenctionArguments with the most typical headers predefined.
static java.lang.String HEADER_ACCEPT
          Constant for the "Accept" header
static java.lang.String HEADER_ACCEPT_XMLALL
          Constant for the "application/xml, * /*" accept header value
static java.lang.String HEADER_SEPARATOR
           
 
Constructor Summary
ConnectionArguments()
           
 
Method Summary
 void addExtraHeaders(java.lang.String extraHeaders)
          This method parses the extraHeaders argument and splits it by HEADER_SEPARATOR.
 void addHeader(java.lang.String key, java.lang.String value)
          Adds a new header to this object with the given name and value
 java.lang.String getAcceptHeader()
          Returns the value set for the accept header.
 java.util.Set<java.lang.String> getHeadersNames()
          Returns the collection of the names for all the headers defined in this object
 int getHeadersSize()
          Returns the number of request headers stored in this object
 java.lang.String getHeaderValue(java.lang.String key)
          Returns the value set for the key header or null, if no such header is set
 void removeHeader(java.lang.String key)
          Removes the header with the given name
 void setAcceptHeader(java.lang.String acceptHeader)
          Sets the value of the accept header.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HEADER_ACCEPT

public static final java.lang.String HEADER_ACCEPT
Constant for the "Accept" header

See Also:
Constant Field Values

HEADER_ACCEPT_XMLALL

public static final java.lang.String HEADER_ACCEPT_XMLALL
Constant for the "application/xml, * /*" accept header value

See Also:
Constant Field Values

DEFAULT

public static final ConnectionArguments DEFAULT
An instance of ConenctionArguments with the most typical headers predefined.


HEADER_SEPARATOR

public static final java.lang.String HEADER_SEPARATOR
See Also:
Constant Field Values
Constructor Detail

ConnectionArguments

public ConnectionArguments()
Method Detail

getAcceptHeader

public java.lang.String getAcceptHeader()
Returns the value set for the accept header.


setAcceptHeader

public void setAcceptHeader(java.lang.String acceptHeader)
Sets the value of the accept header.

Parameters:
acceptHeader -

addHeader

public void addHeader(java.lang.String key,
                      java.lang.String value)
Adds a new header to this object with the given name and value


removeHeader

public void removeHeader(java.lang.String key)
Removes the header with the given name


getHeadersSize

public int getHeadersSize()
Returns the number of request headers stored in this object


getHeadersNames

public java.util.Set<java.lang.String> getHeadersNames()
Returns the collection of the names for all the headers defined in this object


getHeaderValue

public java.lang.String getHeaderValue(java.lang.String key)
Returns the value set for the key header or null, if no such header is set


addExtraHeaders

public void addExtraHeaders(java.lang.String extraHeaders)
This method parses the extraHeaders argument and splits it by HEADER_SEPARATOR. The method then adds all of the individual strings to the list of headers. Example: {@code addExtraHeaders( "header1=value for header 1\nheader2=value for header 2\nheader3=value for header 3");

Parameters:
extraHeaders -