public interface DiscoveryGroupManagement
Modifier and Type | Field and Description |
---|---|
static String[] |
ALL_GROUPS
Convenience constant used to request that attempts be made to
discover all lookup services that are within range, and which
belong to any group.
|
static String[] |
NO_GROUPS
Convenience constant used to request that discovery by group
membership be halted (or not started, if the group discovery
mechanism is simply being instantiated).
|
Modifier and Type | Method and Description |
---|---|
void |
addGroups(String[] groups)
Adds a set of group names to the managed set of groups.
|
String[] |
getGroups()
Returns an array consisting of the elements of the managed set
of groups; that is, the names of the groups whose members are the
lookup services to discover.
|
void |
removeGroups(String[] groups)
Deletes a set of group names from the managed set of groups.
|
void |
setGroups(String[] groups)
Replaces all of the group names in the managed set with names from
a new set.
|
static final String[] ALL_GROUPS
static final String[] NO_GROUPS
String[] getGroups()
String
array consisting of the elements of the
managed set of groupssetGroups(java.lang.String[])
void addGroups(String[] groups) throws IOException
DiscoveryPermission
on each of the groups in the
new set, otherwise a SecurityException
will be
propagated through this method.groups
- String
array consisting of the group names
to add to the managed set.IOException
- because an invocation of this method may
result in the re-initiation of the discovery process, which can
throw an IOException
when socket allocation occurs.UnsupportedOperationException
- this exception
occurs when there is no managed set of groups to augment.
That is, the current managed set of groups is null
.
If the managed set of groups is null
, all groups
are being discovered; thus, requesting that a set of groups be
added to the set of all groups makes no sense.NullPointerException
- this exception occurs when
either null
is input to the groups
parameter, or one or more of the elements of the
groups
parameter is null
. If a
null
is input, then the entity is effectively
requesting that "all groups" be added to the current managed
set of groups; which is not allowed. (Note that if the entity
wishes to change the managed set of groups from a finite set
of names to "all groups", the setGroups
method
should be invoked with null
input.)removeGroups(java.lang.String[])
void setGroups(String[] groups) throws IOException
If null (ALL_GROUPS
) is input to this method, then
attempts will be made to discover all (as yet) undiscovered lookup
services that are within range, and which are members of any group.
If the empty array (NO_GROUPS
) is input, then group
discovery will cease until this method is invoked with an input
parameter that is non-null
and non-empty.
Note that any entity that invokes this method must have
DiscoveryPermission
on each of the groups in the
new set, otherwise a SecurityException
will be
propagated through this method.
groups
- String
array consisting of the group
names that will replace the current names in the
managed set.IOException
- because an invocation of this method may
result in the re-initiation of the discovery process, which can
throw an IOException
when socket allocation occurs.getGroups()
void removeGroups(String[] groups)
NO_GROUPS
) is input, this method takes
no action.groups
- String
array consisting of the group names
that will be removed from the managed set.UnsupportedOperationException
- this exception
occurs when there is no managed set of groups from which
remove elements.NullPointerException
- this exception occurs when
null
is input to the groups
parameter.addGroups(java.lang.String[])
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.