Oracle Application Server Wireless Java API Reference
B14043-01


oracle.panama.messaging.common
Class Header

java.lang.Object
  extended byoracle.panama.messaging.common.Header

All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable

public class Header
extends java.lang.Object
implements java.io.Externalizable

The class maintains the name/value pair to represent a header of the MessagePart. A few commonly used headers are defined as constants in MessagePart class. The application specific header can be added as long as both sender and recipient agree upon the meaning associated with the header name.

See Also:
MessagePart, Serialized Form

Constructor Summary
Header()
Constructor.
Header(java.lang.String name, java.lang.String value)
Constructor.

Method Summary
java.lang.String getName()
Returns the name of this header.
java.lang.String getValue()
Returns the value of this header.
void readExternal(java.io.ObjectInput oi)
Read a message instance from a stream.
void setName(java.lang.String name, java.lang.String value)
Set the name and value of the header.
void writeExternal(java.io.ObjectOutput oo)
Write a message instance to a stream.

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

Header

public Header()
Constructor. Creates empty header. Use setName, setValue to set the name value for the header.

Header

public Header(java.lang.String name,
              java.lang.String value)
Constructor. Creates header with the given name value pair.

Method Detail

getName

public java.lang.String getName()
Returns the name of this header.
Returns:
the name of the header.

getValue

public java.lang.String getValue()
Returns the value of this header.
Returns:
the value of this header.

readExternal

public void readExternal(java.io.ObjectInput oi)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Read a message instance from a stream.
Specified by:
readExternal in interface java.io.Externalizable
Parameters:
oi - the stream to read from.
Throws:
java.io.IOException
java.lang.ClassNotFoundException

setName

public void setName(java.lang.String name,
                    java.lang.String value)
Set the name and value of the header.
Parameters:
name - name of the header.
value - value of the header.

writeExternal

public void writeExternal(java.io.ObjectOutput oo)
                   throws java.io.IOException
Write a message instance to a stream.
Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
oo - the stream to write to.
Throws:
java.io.IOException

Oracle Application Server Wireless Java API Reference
B14043-01


Copyright © 2004 Oracle Corporation. All Rights Reserved.