|
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.MessageImpl
A MessageImpl contains data and protocol specific information that are exchanged between peer protocols. A MessageImpl consists of a queue of data chunks that are assiciated with a MessageImplTag. A MessageImpl is also associated to the TransportAddress of the sender and the receiver of the message. Note that several different chunks of data associated to the same tag can be pushed. In that case, several pops will be needed to retrieve all the chunks.
Constructor Summary | |
MessageImpl()
Constructor for outgoing message. |
|
MessageImpl(byte[] src)
|
|
MessageImpl(byte[] src,
int offset)
|
|
MessageImpl(byte[] src,
int offset,
int len)
Constructor for incoming messages |
Method Summary | |
net.jxta.endpoint.Message |
dup()
Duplicate the message. |
net.jxta.endpoint.EndpointAddress |
getDestAddress()
|
java.io.InputStream |
getInputStream()
Return an InputStream on the entire message. |
java.util.Enumeration |
getNames()
Returns an Enumeration containing all the MessageTag names in the message. |
int |
getSize(java.lang.String atag)
Get the size of a particular tag's data in the message. |
net.jxta.endpoint.EndpointAddress |
getSrcAddress()
|
java.util.Vector |
getTags()
|
java.io.InputStream |
pop(java.lang.String search)
Pop an InputStream associated with a symbolic name |
void |
push(java.lang.String name,
java.io.InputStream inputStream)
Push an a new InputStream onto the message associated with a symbolic name. |
void |
setDestAddress(net.jxta.endpoint.EndpointAddress addr)
The following public API is not intended to the application but only to the endpoint implementation. |
void |
setSrcAddress(net.jxta.endpoint.EndpointAddress addr)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public MessageImpl()
public MessageImpl(byte[] src)
public MessageImpl(byte[] src, int offset)
public MessageImpl(byte[] src, int offset, int len)
Method Detail |
public void push(java.lang.String name, java.io.InputStream inputStream) throws java.io.IOException
name
- is the symbolic name associated with the InputStreaminputStream
- is the new InputStream to push onto the messagepublic java.io.InputStream pop(java.lang.String search) throws java.io.IOException
name
- is the symbolic name associated with the InputStream to get.public int getSize(java.lang.String atag)
atag
- the name of the tag whose size to getpublic java.util.Enumeration getNames()
public net.jxta.endpoint.Message dup()
public java.io.InputStream getInputStream()
public void setDestAddress(net.jxta.endpoint.EndpointAddress addr)
public void setSrcAddress(net.jxta.endpoint.EndpointAddress addr)
public net.jxta.endpoint.EndpointAddress getDestAddress()
public net.jxta.endpoint.EndpointAddress getSrcAddress()
public java.util.Vector getTags()
|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |