|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.pushtotest.tool.protocolhandler.HeaderWrapper
public abstract class HeaderWrapper
This is an abstract class that implements the non-type specific parts of the header interface. This will make it easy to implement new wrappers by inheriting from this rather than having to just reimplment the interface over and over.
| Field Summary | |
|---|---|
protected java.util.Map |
headers
|
| Constructor Summary | |
|---|---|
HeaderWrapper()
|
|
| Method Summary | |
|---|---|
java.lang.String |
get(java.lang.String name)
Returns the value of a single header variable as a String. |
java.util.Iterator |
getHeaders()
Returns an Itterator of all of the header values so that they user can get the list and then get the values. |
abstract java.lang.String |
id()
Returns an id for this protocol. |
void |
set(java.lang.String name,
java.lang.String value)
Sets a parameter value pair as something that should be set in the header of this protocol. |
void |
set(java.lang.String name,
java.lang.String value,
boolean encode)
Sets a parameter value pair as something that should be set in the header of this protocol. |
abstract java.lang.String |
toString()
Returns the content of the header to be used by the Protocol. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map headers
| Constructor Detail |
|---|
public HeaderWrapper()
| Method Detail |
|---|
public abstract java.lang.String id()
id in interface Header
public void set(java.lang.String name,
java.lang.String value)
set(name,value,encode) method passing through the
values and setting encode to 'false'.
set in interface Headername - The name of the header variable.value - The value to set for this header variable.
public void set(java.lang.String name,
java.lang.String value,
boolean encode)
set in interface Headername - The name of the header variable.value - The value to set for this header variable.encode - Whether or not to encode the value with the right encoder
for this type.public java.lang.String get(java.lang.String name)
get in interface Headername - The name of the header variable to look for.public java.util.Iterator getHeaders()
getHeaders in interface Headerpublic abstract java.lang.String toString()
toString in interface HeadertoString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||