|
Project JXTA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jxta.protocol.DiscoveryQueryMsg
net.jxta.impl.protocol.DiscoveryQuery
public class DiscoveryQuery
Implements the Discovery Query Message according to the schema defined by the standard JXTA Peer Discovery Protocol (PDP).
<xs:element name="DiscoveryQuery" type="jxta:DiscoveryQuery"/>
<xsd:simpleType name="DiscoveryQueryType">
<xsd:restriction base="xsd:string">
<!-- peer -->
<xsd:enumeration value="0"/>
<!-- group -->
<xsd:enumeration value="1"/>
<!-- adv -->
<xsd:enumeration value="2"/>
</xsd:restriction>
</xsd:simpleType>
<xs:complexType name="DiscoveryQuery">
<xs:sequence>
<xs:element name="Type" type="jxta:DiscoveryQueryType"/>
<xs:element name="Threshold" type="xs:unsignedInt" minOccurs="0"/>
<xs:element name="Attr" type="xs:string" minOccurs="0"/>
<xs:element name="Value" type="xs:string" minOccurs="0"/>
<!-- The following should refer to a peer adv, but is instead a whole doc for historical reasons -->
<xs:element name="PeerAdv" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
DiscoveryService,
DiscoveryServiceImpl,
JXTA Protocols Specification : Peer Discovery Protocol| Constructor Summary | |
|---|---|
DiscoveryQuery()
Default constructor |
|
DiscoveryQuery(Element doc)
Construct from a StructuredDocument |
|
| Method Summary | |
|---|---|
Document |
getDocument(MimeMediaType asMimeType)
|
protected boolean |
handleElement(Element raw)
Process an individual element from the document during parse. |
protected void |
initialize(Element root)
Intialize a Discovery Query from a portion of a structured document. |
String |
toString()
Deprecated. should not be used. use getDocument().toString() instead. |
| Methods inherited from class net.jxta.protocol.DiscoveryQueryMsg |
|---|
getAdvertisementType, getAttr, getDiscoveryType, getPeerAdv, getPeerAdvertisement, getThreshold, getValue, setAttr, setDiscoveryType, setPeerAdv, setPeerAdvertisement, setThreshold, setValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DiscoveryQuery()
public DiscoveryQuery(Element doc)
| Method Detail |
|---|
protected boolean handleElement(Element raw)
protected boolean handleElement(Element elem) {
if (super.handleElement()) {
// it's been handled.
return true;
}
... handle elements here ...
// we don't know how to handle the element
return false;
}
elem - the element to be processed.
protected void initialize(Element root)
root - document to intialize frompublic Document getDocument(MimeMediaType asMimeType)
getDocument in class DiscoveryQueryMsgpublic String toString()
toString in class Object
|
JXTA J2SE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||