net.jxta.discovery
Class DiscoveryEvent
java.lang.Object
java.util.EventObject
net.jxta.discovery.DiscoveryEvent
- All Implemented Interfaces:
- Serializable
public class DiscoveryEvent
- extends EventObject
Container for DiscoveryService events. The source of the event is the Endpoint
address of the responding peer
- See Also:
- Serialized Form
DiscoveryEvent
public DiscoveryEvent(Object source,
DiscoveryResponseMsg response,
int queryid)
- Creates a new event
- Parameters:
source
- The source of the event is the Endpoint address of the responding peerresponse
- The response message for which this event is being generated.queryid
- The query id associated with the response returned in this event- See Also:
DiscoveryResponseMsg
,
ResolverResponseMsg
getResponse
public DiscoveryResponseMsg getResponse()
- Returns the response associated with the event
- Returns:
- DiscoveryResponseMsg
- See Also:
DiscoveryResponseMsg
getQueryID
public int getQueryID()
- Returns the query id associated with the response returned in this event
- Returns:
- query id associated with the response
getSearchResults
public Enumeration<Advertisement> getSearchResults()
- Returns an array of advertisements contained in the DiscoveryResponse
for this event.
- Returns:
- Enumeration of Advertisements