java.lang.Object
net.jxta.protocol.DiscoveryQueryMsg
net.jxta.impl.protocol.DiscoveryQuery
- public class DiscoveryQuery
- extends net.jxta.protocol.DiscoveryQueryMsg
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>
| Methods inherited from class net.jxta.protocol.DiscoveryQueryMsg |
getAdvertisementType, getAttr, getDiscoveryType, getPeerAdv, getPeerAdvertisement, getThreshold, getValue, setAttr, setDiscoveryType, setPeerAdv, setPeerAdvertisement, setThreshold, setValue |
LOG
private static final org.apache.log4j.Logger LOG
typeTag
private static final java.lang.String typeTag
- See Also:
- Constant Field Values
peerAdvTag
private static final java.lang.String peerAdvTag
- See Also:
- Constant Field Values
thresholdTag
private static final java.lang.String thresholdTag
- See Also:
- Constant Field Values
queryAttrTag
private static final java.lang.String queryAttrTag
- See Also:
- Constant Field Values
queryValueTag
private static final java.lang.String queryValueTag
- See Also:
- Constant Field Values
DiscoveryQuery
public DiscoveryQuery()
- Default constructor
DiscoveryQuery
public DiscoveryQuery(net.jxta.document.Element doc)
- Construct from a StructuredDocument
handleElement
protected boolean handleElement(net.jxta.document.Element raw)
- Process an individual element from the document during parse. Normally,
implementations will allow the base advertisments a chance to handle the
element before attempting ot handle the element themselves. ie.
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;
}
initialize
protected void initialize(net.jxta.document.Element root)
- Intialize a Discovery Query from a portion of a structured document.
getDocument
public net.jxta.document.Document getDocument(net.jxta.document.MimeMediaType asMimeType)
- null
toString
public java.lang.String toString()
- Deprecated. should not be used. use getDocument().toString() instead.
- return the string representaion of this doc