Changes the service's current set of attributes using the same semantics as the
modifyAttributes
method of the
ServiceRegistration
class.
The association of the new set of attributes with the service will be propagated to each lookup service with which the service is registered. Note that this propagation is performed asynchronously, thus there is no guarantee that the propagation of the attributes to all lookup services with which the service is registered will have completed upon return from this method.
Note that if the length of the array containing the templates does not equal the length of the array containing the modifications, an IllegalArgumentException
will be thrown and propagated through this method.
Note also that because there is no guarantee that attribute propagation will have completed upon return from this method, services that invoke this method must take care not to modify the contents of the attrSets
parameter. Doing so could cause the service's attribute state to be corrupted or inconsistent on a subset of the lookup services with which the service is registered as compared with the state reflected on the remaining lookup services. It is for this reason that the effects of modifying the contents of the attrSets
parameter, after this method is invoked, are undefined.
@param attrSetTemplates array of Entry
used to identifywhich elements to modify from the service's current set of attributes
@param attrSets array of Entry
containing theactual modifications to make in the matching sets found using the attrSetTemplates
parameter
@throws java.lang.IllegalArgumentException if the array containing thetemplates does not equal the length of the array containing the modifications
@see net.jini.core.entry.Entry
@see net.jini.core.lookup.ServiceRegistration#modifyAttributes