|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--net.jxta.document.Advertisement
|
+--net.jxta.protocol.PresenceAdvertisement
|
+--net.jxta.impl.protocol.PresenceAdv
An implementation of the PresenceAdvertisement abstract class. This class is responsible for parsing and formatting the XML document used to define presence information for a peer.
| Nested Class Summary | |
static class |
PresenceAdv.Instantiator
An Instantiator used by the AdvertisementFactory to instantiate this class in an abstract fashion. |
| Field Summary |
| Fields inherited from class net.jxta.document.Advertisement |
expiration |
| Constructor Summary | |
PresenceAdv()
Creates a new presence advertisement. |
|
PresenceAdv(net.jxta.document.Element document)
Creates a new presence advertisement by parsing the given document. |
|
PresenceAdv(java.io.InputStream stream)
Creates a new presence advertisement by parsing the given stream. |
|
| Method Summary | |
net.jxta.document.Document |
getDocument(net.jxta.document.MimeMediaType asMimeType)
Returns a Document object containing the advertisement's document tree. |
void |
readAdvertisement(net.jxta.document.TextElement document)
Parses the given document tree for the presence advertisement. |
java.lang.String |
toString()
Returns an XML String representation of the advertisement. |
| Methods inherited from class net.jxta.protocol.PresenceAdvertisement |
getAdvertisementType, getEmailAddress, getID, getName, getPeerID, getPresenceStatus, setEmailAddress, setName, setPeerID, setPresenceStatus |
| Methods inherited from class net.jxta.document.Advertisement |
clone, getLocalExpirationTime |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public PresenceAdv()
public PresenceAdv(java.io.InputStream stream)
throws java.io.IOException
stream - the InputStream source of the advertisement data.
java.io.IOException - if the advertisement can't be parsed from the stream.
public PresenceAdv(net.jxta.document.Element document)
throws java.lang.IllegalArgumentException
document - the source of the advertisement data.| Method Detail |
public net.jxta.document.Document getDocument(net.jxta.document.MimeMediaType asMimeType)
throws java.lang.IllegalArgumentException
getDocument in class net.jxta.document.AdvertisementasMimeType - the desired MIME type for the advertisement rendering.
java.lang.IllegalArgumentException - thrown if either the email address or
the peer ID is null.
public void readAdvertisement(net.jxta.document.TextElement document)
throws java.lang.IllegalArgumentException
document - the object containing the presence advertisement data.
java.lang.IllegalArgumentException - if the document is not a presence
advertisement, as expected.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||