Project 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 Discovery Service which generated the event.

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 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 Discovery Service which generated the event.
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 getSearchResults()
Returns an array of advertisements contained in the DiscoveryResponse for this event.

Returns:
Enumeration of Advertisements

JXTA J2SE