|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.rational.rpe.common.utils.ConnectionArguments
public class ConnectionArguments
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 |
|---|
public static final java.lang.String HEADER_ACCEPT
public static final java.lang.String HEADER_ACCEPT_XMLALL
public static final ConnectionArguments DEFAULT
public static final java.lang.String HEADER_SEPARATOR
| Constructor Detail |
|---|
public ConnectionArguments()
| Method Detail |
|---|
public java.lang.String getAcceptHeader()
public void setAcceptHeader(java.lang.String acceptHeader)
acceptHeader -
public void addHeader(java.lang.String key,
java.lang.String value)
public void removeHeader(java.lang.String key)
public int getHeadersSize()
public java.util.Set<java.lang.String> getHeadersNames()
public java.lang.String getHeaderValue(java.lang.String key)
key header or null, if no such header is set
public void addExtraHeaders(java.lang.String extraHeaders)
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");
extraHeaders -
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||