Name
Message
Synopsis
Objects that implement this interface represent the data sent over pipes or an endpoint. Messages contain source and destination addresses, and a payload that consists of one or more message elements. Each message element has a particular MIME type (usually “text/xml”).
Message objects are typically created
via the createMessage( )
method of the pipe
service, which creates a message with the appropriate addresses and
an empty payload. The newMessageElement( )
method
is used to create elements that are subsequently added to the payload
via the addMessageElement( )
method.
public interface Message { // Property Accessor Methods (by property name) public abstract EndpointAddress getDestinationAddress(); public abstract void setDestinationAddress(EndpointAddress dstAddress); public abstract MessageElementEnumeration getElements(); public abstract net.jxta.util.StringEnumeration getNames(); public abstract java.util.Enumeration getNamespaces(); public abstract EndpointAddress getSourceAddress(); public abstract void setSourceAddress(EndpointAddress srcAddress); // Public Instance Methods public abstract void addElement(MessageElement add); public abstract Object clone(); public abstract boolean equals(Object o); public abstract byte[ ] getBytes(String qname); public abstract MessageElement getElement(String name); public abstract String getString(String elementName); public abstract boolean hasElement(String nsname); public abstract MessageElement newMessageElement ...
Get JXTA in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.