|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.artima.place.MulticastDiscoveryLink
A Link
that performs queries in lookup services located via
multicast discovery.
Constructor Summary | |
MulticastDiscoveryLink(net.jini.core.lookup.ServiceTemplate template)
Construct a MulticastDiscoveryLink with the passed
ServiceTemplate . |
|
MulticastDiscoveryLink(java.lang.String[] groups,
net.jini.core.lookup.ServiceTemplate template)
Construct a MulticastDiscoveryLink with the passed
groups String array and ServiceTemplate . |
Method Summary | |
LinkActivation |
activate(ActivationClient al)
Retrieve this service. |
java.lang.String[] |
getGroups()
Returns the groups used by this link in performing multicast discovery when activated. |
net.jini.core.lookup.ServiceTemplate |
getServiceTemplate()
Returns a duplicate of the ServiceTemplace used in
lookups when this link is activated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MulticastDiscoveryLink(net.jini.core.lookup.ServiceTemplate template) throws java.io.IOException, java.lang.ClassNotFoundException
MulticastDiscoveryLink
with the passed
ServiceTemplate
.
The activate
method will perform multicast discovery of
all reachable lookup services, and query each discovered lookup
service with the passed ServiceTemplate
.
template
- the ServiceTemplate
with which to peform
lookups when this link is activatedjava.io.IOException
- if an I/O error occurs when attempting to serialize
or deserialize the ServiceTemplate
.java.lang.ClassNotFoundException
- if a class can't be found when attempting
deserialize the duplicate ServiceTemplate
.public MulticastDiscoveryLink(java.lang.String[] groups, net.jini.core.lookup.ServiceTemplate template) throws java.io.IOException, java.lang.ClassNotFoundException
MulticastDiscoveryLink
with the passed
groups String
array and ServiceTemplate
.
The activate
method will perform multicast discovery,
and query each discovered lookup service with the passed
ServiceTemplate
.
Does multicast discovery and lookups. When this link is activated it
will just keep trying until either a match is found or the user
aborts. If multiple matches are found, a random match is returned.
groups
- an array of String
group names with which
perform multicast discovery when this link is activated.template
- the ServiceTemplate
with which to peform
lookups when this link is activatedMethod Detail |
public LinkActivation activate(ActivationClient al)
activate
method will return promptly, returning a LinkActivation
object that enables clients to abort an activation. Invoking activate
again while an activation is currently in progress just starts a new
activation independent of the already running one.activate
in interface Link
al
- the ActivationClient
that will be notified when
this link activation completesLinkActivation
object with which the client
can interact with this activation of this Link
NullPointerException
- if passed activationClient
is null
public net.jini.core.lookup.ServiceTemplate getServiceTemplate() throws java.io.IOException, java.lang.ClassNotFoundException
ServiceTemplace
used in
lookups when this link is activated. The duplicate is created by
serializing and then deserializing the actual
ServiceTemplate
.ServiceTemplate
used by this
link when activatedjava.io.IOException
- if an I/O error occurs when attempting to duplicate
the ServiceTemplate
.java.lang.ClassNotFoundException
- if a class can't be found when attempting
deserialize the duplicate ServiceTemplate
.public java.lang.String[] getGroups()
null
return value indicates
this link will attempt discovery of all reachable lookup services
when activated.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |