|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.protocol.DiscoveryResponseMsg
public abstract class DiscoveryResponseMsg
This class defines the DiscoveryService message "Response".
The default behavior of this abstract class is simply a place holder for the generic resolver query fields. This message is the response to the DiscoveryQueryMsg.
DiscoveryService
,
DiscoveryQueryMsg
Field Summary | |
---|---|
protected List<Advertisement> |
advertisements
The advertisement responses deserialized. |
protected String |
attr
attribute used by the query |
protected List<Long> |
expirations
Expirations |
protected PeerAdvertisement |
peerAdvertisement
Responding peer's advertisement |
protected List<String> |
responses
The advertisement responses serialized into strings. |
protected int |
type
Advertisement type used by the query FIXME 20040514 bondolo@jxta.org not a great default... |
protected String |
value
Value used by the query |
Constructor Summary | |
---|---|
DiscoveryResponseMsg()
|
Method Summary | |
---|---|
Enumeration<Advertisement> |
getAdvertisements()
Get the responses to the query as advertisements. |
static String |
getAdvertisementType()
All messages have a type(in xml this is ! |
int |
getDiscoveryType()
Get the response type |
abstract Document |
getDocument(MimeMediaType asMimeType)
Write advertisement into a document. asMimeType is a mime media-type specification and provides the form of the document which is being requested. |
Enumeration<Long> |
getExpirations()
Gets the expirations attribute of the DiscoveryResponseMsg object |
PeerAdvertisement |
getPeerAdvertisement()
returns the responding peer's advertisement |
String |
getQueryAttr()
returns the attributes used by the query |
String |
getQueryValue()
returns the value used by the query |
int |
getResponseCount()
Get the response count |
Enumeration<String> |
getResponses()
returns the response(s) |
void |
setDiscoveryType(int type)
set the Response type whether it's peer, or group discovery |
void |
setExpirations(List<Long> expirations)
set the expirations for this query |
void |
setPeerAdvertisement(PeerAdvertisement newAdv)
Sets the responding peer's advertisement |
void |
setQueryAttr(String attr)
Set the attribute used by the query |
void |
setQueryValue(String value)
Set the value used by the query |
void |
setResponses(List responses)
Set the responses to the query. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected String attr
protected PeerAdvertisement peerAdvertisement
protected final List<String> responses
protected final List<Advertisement> advertisements
protected final List<Long> expirations
protected int type
protected String value
Constructor Detail |
---|
public DiscoveryResponseMsg()
Method Detail |
---|
public static String getAdvertisementType()
public int getDiscoveryType()
public void setDiscoveryType(int type)
type
- int representing the typepublic abstract Document getDocument(MimeMediaType asMimeType)
asMimeType
- mime-type requested
public PeerAdvertisement getPeerAdvertisement()
public void setPeerAdvertisement(PeerAdvertisement newAdv)
newAdv
- the responding Peer's advertisementpublic String getQueryAttr()
public String getQueryValue()
public int getResponseCount()
public Enumeration<Long> getExpirations()
public void setExpirations(List<Long> expirations)
expirations
- the expirations for this querypublic Enumeration<String> getResponses()
public void setResponses(List responses)
Advertisement
, String
or InputStream
.
responses
- List of responsespublic void setQueryAttr(String attr)
attr
- query attributepublic void setQueryValue(String value)
value
- Query valuepublic Enumeration<Advertisement> getAdvertisements()
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |