Project JXTA

net.jxta.impl.endpoint
Interface MessageTag

All Known Implementing Classes:
IncomingMessageTag, OutgoingMessageTag

public interface MessageTag

Defines the MessageTag interface used by the implementation on endpoint messages.


Method Summary
 java.io.InputStream getInputStream()
          returns an InputStream to the data of the tag.
 java.lang.String getTag()
          Get the String representation of the tag.
 java.io.InputStream getWireFormatInputStream()
           
 void setInputStream(java.io.InputStream thisStream)
          This method needs to be provided in order to implement the MessageTag interface, but since the stream has been set at the construction of this object, it cannot be changed later on.
 void setTag(java.lang.String thisTag)
          set this MessagesTag with the tag.
 void share()
          Makes the tag sharable
 

Method Detail

setTag

public void setTag(java.lang.String thisTag)
            throws java.io.IOException
set this MessagesTag with the tag. If the tag is invalid, IOException is thrown.
Parameters:
tag - String containing of the tag

getTag

public java.lang.String getTag()
Get the String representation of the tag.
Returns:
the String representation of the tag.

setInputStream

public void setInputStream(java.io.InputStream thisStream)
                    throws java.io.IOException
This method needs to be provided in order to implement the MessageTag interface, but since the stream has been set at the construction of this object, it cannot be changed later on. Just throw an exception.
Parameters:
thisStream - InputStream provided by the caller.

getInputStream

public java.io.InputStream getInputStream()
returns an InputStream to the data of the tag.
Returns:
returns an InputStream to the data of the tag.

getWireFormatInputStream

public java.io.InputStream getWireFormatInputStream()

share

public void share()
Makes the tag sharable

Project JXTA