|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.jxta.endpoint.NewMessage
Messages are sent and received by peer endpoints and pipes. Applications are expected to use this class in order to exchange messages.
This class is synchronized. Using NewMesage from multiple threads may still create unpredicted behaviour. usegetModCount()
to verify the object has not changed.
EndpointAddress,
InputPipe,
OutputPipe,
PipeService| Inner Class Summary | |
static class |
NewMessage.ElementIterator
Deprecated. A List Iterator which also provides the ability to determine the namespace of the current element. |
| Constructor Summary | |
NewMessage()
Deprecated. Standard Constructor for messages. |
|
NewMessage(java.lang.String defaultNamespace)
Deprecated. Standard Constructor for messages. |
|
| Method Summary | |
void |
addElement(NewMessageElement add)
Deprecated. Add a MessageElement into the message. |
void |
addElement(java.lang.String namespace,
NewMessageElement add)
Deprecated. Add a MessageElement into the message using the specified namespace. |
void |
clear()
Deprecated. Removes all of the elements in all namespaces from the message. |
java.lang.Object |
clone()
Deprecated. Duplicates the Message. |
boolean |
equals(java.lang.Object target)
Deprecated. Compare this Message against another. |
long |
getByteLength()
Deprecated. Returns the aggregate size of all the memeber elements. |
java.lang.String |
getDefaultNamespace()
Deprecated. Return the default Namespace of this message. |
NewMessageElement |
getElement(java.lang.String name)
Deprecated. Retrieve a element by name from the message without regard to namespace. |
NewMessageElement |
getElement(java.lang.String namespace,
java.lang.String name)
Deprecated. Retrieve a element by name in the specified namespace from the message. |
NewMessage.ElementIterator |
getElements()
Deprecated. Returns a list iterator of all of the elements contained in this message. |
NewMessage.ElementIterator |
getElements(MimeMediaType type)
Deprecated. Returns a list iterator of all of the elements contained in this message whose mime-type matchs the given in the order they were added. |
NewMessage.ElementIterator |
getElements(java.lang.String name)
Deprecated. Returns a list iterator of all of the elements contained in this message who's name matches the specified name. |
java.util.ListIterator |
getElements(java.lang.String namespace,
MimeMediaType type)
Deprecated. Returns a list iterator of all of the elements contained in this message whose name's match the given in the order they were added. |
java.util.ListIterator |
getElements(java.lang.String namespace,
java.lang.String name)
Deprecated. Returns a list iterator of all of the elements contained in the specified namespace who's name matches the specified name. |
java.util.Iterator |
getMessageLineage()
Deprecated. Returns the lineage of this message, the first item is this message's number. |
int |
getMessageNumber()
Deprecated. Returns the number of this message |
java.lang.Object |
getMessageProperty(java.lang.Object key)
Deprecated. retrieves a transient property from the set for this message. |
int |
getModCount()
Deprecated. Returns the modification count of this message. |
java.util.ListIterator |
getNamespaceElements(java.lang.String namespace)
Deprecated. Returns an list iterator of all of the elements contained in this message which match the specified namespace. |
java.util.Iterator |
getNamespaces()
Deprecated. Returns an iterator of the namespaces present in this message. |
int |
hashCode()
Deprecated. Returns a hash code value for the object. |
boolean |
removeElement(NewMessageElement remove)
Deprecated. Remove an the first occurance of an element from the message. |
NewMessageElement |
replaceElement(NewMessageElement replacement)
Deprecated. Replace a NewMessageElement in the message using the specified
namespace. |
NewMessageElement |
replaceElement(java.lang.String namespace,
NewMessageElement replacement)
Deprecated. Replace a NewMessageElement in the message using the specified
namespace. |
java.lang.Object |
setMessageProperty(java.lang.Object key,
java.lang.Object value)
Deprecated. Associate a transient property with this message. |
java.lang.String |
toString()
Deprecated. {@inheritDoc} Displays the lineage of the message including its own message number. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public NewMessage()
public NewMessage(java.lang.String defaultNamespace)
defaultNamespace - the namespace which is assumed when calls are
made that don't include a namespace specification.| Method Detail |
public java.lang.Object clone()
clone in class java.lang.Objectpublic boolean equals(java.lang.Object target)
equals in class java.lang.Objecttarget - The to compare against.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getDefaultNamespace()
public void addElement(NewMessageElement add)
add - the Element to add to the message.
public void addElement(java.lang.String namespace,
NewMessageElement add)
namespace - contains the namespace of the element to add. You can
specify null as a shorthand for the default namespace.add - the Element to add to the message.public NewMessageElement replaceElement(NewMessageElement replacement)
NewMessageElement in the message using the specified
namespace. This method will remove all NewMessageElement instances in
the default namespace which match the specified name (if any) and then
insert the replacement element. The existing version of the element is
returned, if more than one matching element was removed, a random
matching element is returned.replacement - the Element to be inserted into to the message.
public NewMessageElement replaceElement(java.lang.String namespace,
NewMessageElement replacement)
NewMessageElement in the message using the specified
namespace. This method will remove all NewMessageElement instances which
match the specified name (if any) and then insert the replacement
element. The existing version of the element is returned, if more than
one matching element was removed, a random matching element is returned.namespace - contains the namespace of the element to be replaced.
You can specify null as a shorthand for the default namespace.replacement - the Element to be inserted into to the message.public java.util.Iterator getNamespaces()
public NewMessageElement getElement(java.lang.String name)
name - The name of the element to attept to retrieve.
public NewMessageElement getElement(java.lang.String namespace,
java.lang.String name)
namespace - contains the namespace of the element to get. You can
specify null as a shorthand for the default namespace.name - contains the name of the element to getpublic NewMessage.ElementIterator getElements()
public NewMessage.ElementIterator getElements(java.lang.String name)
name - the name of the elements to match againstpublic java.util.ListIterator getNamespaceElements(java.lang.String namespace)
namespace - contains the namespace which must be matched in the
elements returned. You can specify null as a shorthand for the default
namespace.
public java.util.ListIterator getElements(java.lang.String namespace,
java.lang.String name)
namespace - contains the namespace which must be matched in the
elements returned. You can specify null as a shorthand for the default
namespace.name - contains the name of the elements to getpublic NewMessage.ElementIterator getElements(MimeMediaType type)
type - contains the type of the elements to get
public java.util.ListIterator getElements(java.lang.String namespace,
MimeMediaType type)
namespace - contains the namespace which must be matched in the
elements returned. You can specify null as a shorthand for the default
namespace.type - contains the type of the elements to getpublic boolean removeElement(NewMessageElement remove)
remove - the Element to remove from the message.public void clear()
public long getByteLength()
public int getModCount()
public int getMessageNumber()
public java.util.Iterator getMessageLineage()
public java.lang.Object setMessageProperty(java.lang.Object key,
java.lang.Object value)
key - the property keyvalue - the value for the propertypublic java.lang.Object getMessageProperty(java.lang.Object key)
key - the property key.
|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||