JXTA

net.jxta.discovery
Class DiscoveryEvent

java.lang.Object
  extended by java.util.EventObject
      extended by 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

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DiscoveryEvent(Object source, DiscoveryResponseMsg response, int queryid)
          Creates a new event
 
Method Summary
 int getQueryID()
          Returns the query id associated with the response returned in this event
 DiscoveryResponseMsg getResponse()
          Returns the response associated with the event
 Enumeration<Advertisement> getSearchResults()
          Returns an array of advertisements contained in the DiscoveryResponse for this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 peer
response - 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
Method Detail

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

JXSE