|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.impl.endpoint.OutgoingMessageTag
An OutgoingMessageTag encapsulates the name a chunk of data that has to be sent with a Message. This class also implements the InputStream API so it can directely be used by the message layer to produce the bytes to be sent. This implementation assumes that the Message layer and/or the Transport layer does either synchronously send the message or is responsible to copy the data into an private buffer, letting the caller re-use the stream if needed. Doing that allows in the best case situation to avoid an extra copy of the user data, which can be very expensive, both for performance and memory utilization.
Inner Class Summary | |
class |
OutgoingMessageTag.OutMsgTagWireInputStream
This portion is the implementation of the InputStream API. |
Constructor Summary | |
OutgoingMessageTag()
Default constructor |
|
OutgoingMessageTag(java.lang.String thisTag)
Constructor. |
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)
Set the user InputStream. |
void |
setTag(java.lang.String thisTag)
set this MessageTag with the tag. |
void |
share()
This this tag shareable. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public OutgoingMessageTag()
public OutgoingMessageTag(java.lang.String thisTag)
thisTag
- contains the symbolic name of this MessageTag.Method Detail |
public void setTag(java.lang.String thisTag) throws java.io.IOException
tag
- String containing of the tagpublic java.lang.String getTag()
public void setInputStream(java.io.InputStream thisStream) throws java.io.IOException
thisStream
- InputStream provided by the caller.public void share()
public java.io.InputStream getInputStream()
public java.io.InputStream getWireFormatInputStream()
|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |