|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.protocol.DiscoveryQueryMsg
This class defines the DiscoveryService message "Query" The default behavior of this abstract class is simply a place holder for the generic resolver query fields. This message is part of the Peer DiscoveryService Protocol.
<?xml version="1.0" standalone='yes'?> <DiscoveryQuery> <type>int</type> <threshold>int</threshold> <peeradv>peeradv</peeradv> <attribute>attribute</attribute> <value>attribute</value> </DiscoveryQuery>
DiscoveryResponseMsg
Field Summary | |
static int |
threshold
default threshold to limit the number of responses from one peer |
int |
type
|
Constructor Summary | |
DiscoveryQueryMsg()
|
Method Summary | |
static java.lang.String |
getAdvertisementType()
All messages have a type (in xml this is !doctype) which identifies the message |
java.lang.String |
getAttr()
returns the Attr value |
int |
getDiscoveryType()
Get the response type |
abstract Document |
getDocument(MimeMediaType asMimeType)
Write advertisement into a document. |
java.lang.String |
getPeerAdv()
returns the responding's peer advertisement |
int |
getThreshold()
Get the Threshold for number of responses |
java.lang.String |
getValue()
returns the value of Attr |
void |
setAttr(java.lang.String attr)
set the attr |
void |
setDiscoveryType(int type)
set the Response type whether it's peer, or group dsicovery |
void |
setPeerAdv(java.lang.String peer)
set the Response type whether it's peer, or group dsicovery |
void |
setThreshold(int threshold)
set the threshold |
void |
setValue(java.lang.String value)
set the query |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int threshold
public int type
Constructor Detail |
public DiscoveryQueryMsg()
Method Detail |
public static java.lang.String getAdvertisementType()
public int getThreshold()
public int getDiscoveryType()
public java.lang.String getPeerAdv()
public java.lang.String getAttr()
public java.lang.String getValue()
public void setThreshold(int threshold)
threshold
- value to be setpublic void setDiscoveryType(int type)
type
- type of discoverypublic void setPeerAdv(java.lang.String peer)
peer
- public void setAttr(java.lang.String attr)
attr
- attribut of the querypublic void setValue(java.lang.String value)
value
- value of the attribute to querypublic abstract Document getDocument(MimeMediaType asMimeType) throws java.lang.Exception
asMimeType
- mime-type format requestedjava.lang.Exception
- error generating the document
|
Project JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |