public class DiscoveryEvent extends EventObject
DiscoveryListener
interface or the
DiscoveryChangeListener
) to indicate to interested parties that one or more
ServiceRegistrar
objects have been discovered or discarded during the discovery
process.LookupDiscovery
,
LookupLocatorDiscovery
,
LookupDiscoveryManager
,
DiscoveryListener
,
DiscoveryChangeListener
,
ServiceRegistrar
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected Map |
groups
Map from the registrars of this event to the groups in which each is a member.
|
protected ServiceRegistrar[] |
regs
The registrars with which this event is associated.
|
source
Constructor and Description |
---|
DiscoveryEvent(Object source,
Map groups)
Construct a new
DiscoveryEvent object, with the given source and
registrars-to-groups mapping. |
DiscoveryEvent(Object source,
ServiceRegistrar[] regs)
Construct a new
DiscoveryEvent object, with the given source and set of
registrars. |
Modifier and Type | Method and Description |
---|---|
Map |
getGroups()
Returns a set that maps to each registrar referenced by this event, the current set of groups
in which each registrar is a member.
|
ServiceRegistrar[] |
getRegistrars()
Return the set of registrars to which this event applies.
|
getSource, toString
protected ServiceRegistrar[] regs
protected Map groups
public DiscoveryEvent(Object source, ServiceRegistrar[] regs)
DiscoveryEvent
object, with the given source and set of
registrars. The set of registrars should not be empty.source
- the source of this eventregs
- the registrars to which this event appliespublic DiscoveryEvent(Object source, Map groups)
DiscoveryEvent
object, with the given source and
registrars-to-groups mapping. The mapping should not be empty.source
- the source of this eventgroups
- mapping from the elements of the registrars of this event to the member groups
in which each registrar is a memberpublic ServiceRegistrar[] getRegistrars()
public Map getGroups()
To retrieve the set of member groups corresponding
to any element of the array returned by the getRegistrars
method, simply use the
desired element from that array as the key to the get
method of the
Map
object returned by this method and cast to String
[].
Note
that the same Map
object is returned on every call to this method; that is, a
copy is not made.
Map
in which the keys are the elements of the array returned by the
getRegistrars
method of this class; and the values are String
[]
arrays containing the member groups corresponding to each registrar.Copyright © GigaSpaces.