wt.federation
Class FederatedHttpMessage

java.lang.Object
  extended bywt.federation.FederatedHttpMessage
All Implemented Interfaces:
Externalizable, Serializable

public class FederatedHttpMessage
extends Object
implements Externalizable

Represents an HTTP protocol request or response message.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private  FederatedHttpBodyPart body
           
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
private  Hashtable headings
           
private static Hashtable monthNameToNumber
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
 
Constructor Summary
FederatedHttpMessage()
          Constructor returning an instance initialized with an empty set of headings and a null body.
FederatedHttpMessage(FederatedHttpInputStream inputStream)
          Constructor returning an instance initialized with the results of reading and parsing a specified input stream.
 
Method Summary
 void addHeading(String line)
          Parses and adds the specified line to the set of HTTP message headings.
 void addHeading(String keyword, String value)
          Adds the specified keyword/value pair to the set of HTTP message headings.
 FederatedHttpBodyPart getBody()
          Gets the value of the attribute: body.
 Date getDateHeading(String keyword)
          Returns the specified date heading from the heading vector.
 String getHeading(String keyword)
          Returns the specified heading from the heading vector.
 Hashtable getHeadings()
          Gets the value of the attribute: headings.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(FederatedHttpMessage thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void removeHeading(String keyword)
          Removes the specified heading from the set of HTTP message headings.
 void setBody(FederatedHttpBodyPart a_Body)
          Sets the value of the attribute: body.
 void setHeadings(Hashtable a_Headings)
          Sets the value of the attribute: headings.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeTo(OutputStream outputStream)
          Writes the HTTP message as a MIME object to the specified output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

headings

private Hashtable headings

body

private FederatedHttpBodyPart body

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

monthNameToNumber

private static Hashtable monthNameToNumber
Constructor Detail

FederatedHttpMessage

public FederatedHttpMessage()
                     throws WTPropertyVetoException
Constructor returning an instance initialized with an empty set of headings and a null body.

Supported API: true

Throws:
WTPropertyVetoException

FederatedHttpMessage

public FederatedHttpMessage(FederatedHttpInputStream inputStream)
                     throws WTPropertyVetoException,
                            FederationServicesException
Constructor returning an instance initialized with the results of reading and parsing a specified input stream.

Supported API: true

Parameters:
inputStream -
Throws:
WTPropertyVetoException
FederationServicesException
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(FederatedHttpMessage thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getHeadings

public Hashtable getHeadings()
Gets the value of the attribute: headings.

Supported API: false

Returns:
Hashtable

setHeadings

public void setHeadings(Hashtable a_Headings)
                 throws WTPropertyVetoException
Sets the value of the attribute: headings.

Supported API: false

Parameters:
a_Headings -
Throws:
WTPropertyVetoException

getBody

public FederatedHttpBodyPart getBody()
Gets the value of the attribute: body.

Supported API: false

Returns:
FederatedHttpBodyPart

setBody

public void setBody(FederatedHttpBodyPart a_Body)
             throws WTPropertyVetoException
Sets the value of the attribute: body.

Supported API: false

Parameters:
a_Body -
Throws:
WTPropertyVetoException

addHeading

public void addHeading(String line)
                throws WTPropertyVetoException
Parses and adds the specified line to the set of HTTP message headings.

Supported API: true

Parameters:
line -
Throws:
WTPropertyVetoException

addHeading

public void addHeading(String keyword,
                       String value)
                throws WTPropertyVetoException
Adds the specified keyword/value pair to the set of HTTP message headings.

Supported API: true

Parameters:
keyword -
value -
Throws:
WTPropertyVetoException

getHeading

public String getHeading(String keyword)
Returns the specified heading from the heading vector.

Supported API: true

Parameters:
keyword -
Returns:
String

getDateHeading

public Date getDateHeading(String keyword)
Returns the specified date heading from the heading vector.

Supported API: true

Parameters:
keyword -
Returns:
Date

removeHeading

public void removeHeading(String keyword)
Removes the specified heading from the set of HTTP message headings.

Supported API: true

Parameters:
keyword -

writeTo

public void writeTo(OutputStream outputStream)
             throws FederationServicesException
Writes the HTTP message as a MIME object to the specified output stream.

Supported API: true

Parameters:
outputStream -
Throws:
FederationServicesException