class AdminProxy extends Object implements DiscoveryAdmin, JoinAdmin, DestroyAdmin, ReferentUuid, Serializable
Modifier and Type | Field and Description |
---|---|
(package private) ServiceID |
registrarID
The registrar's service ID.
|
private static long |
serialVersionUID |
(package private) Registrar |
server
The registrar.
|
Constructor and Description |
---|
AdminProxy(Registrar server,
ServiceID registrarID)
Constructor for use by getInstance(), ConstrainableAdminProxy.
|
Modifier and Type | Method and Description |
---|---|
void |
addLookupAttributes(Entry[] attrSets)
Add attribute sets for the service.
|
void |
addLookupGroups(String[] groups)
Add new groups to the set to join.
|
void |
addLookupLocators(LookupLocator[] locators)
Add locators for specific new lookup services to join.
|
void |
addMemberGroups(String[] groups)
Adds the given set of names to the set whose elements are the names
of the groups in which the lookup service is currently a member.
|
void |
destroy()
Destroy the service, if possible, including its persistent storage.
|
boolean |
equals(Object obj)
Proxies for servers with the same service ID are considered equal.
|
(package private) static AdminProxy |
getInstance(Registrar server,
ServiceID registrarID)
Returns AdminProxy or ConstrainableAdminProxy instance, depending on
whether given server implements RemoteMethodControl.
|
Entry[] |
getLookupAttributes()
Get the current attribute sets for the service.
|
String[] |
getLookupGroups()
Get the list of groups to join.
|
LookupLocator[] |
getLookupLocators()
Get the list of locators of specific lookup services to join.
|
String[] |
getMemberGroups()
Returns an array consisting of the names of the groups in which the
lookup service is a member.
|
Uuid |
getReferentUuid()
Return the
Uuid that has been assigned to the
resource this proxy represents. |
int |
getUnicastPort()
Returns the port number on which the lookup service listens for
unicast discovery queries.
|
int |
hashCode()
Returns service ID hash code.
|
void |
modifyLookupAttributes(Entry[] attrSetTemplates,
Entry[] attrSets)
Modify the current attribute sets, using the same semantics as
ServiceRegistration.modifyAttributes.
|
private void |
readObject(ObjectInputStream in)
Reads the default serializable field value for this instance, followed
by the registrar's service ID encoded as specified by the
ServiceID.writeBytes method.
|
private void |
readObjectNoData()
Throws InvalidObjectException, since data for this class is required.
|
void |
removeLookupGroups(String[] groups)
Remove groups from the set to join.
|
void |
removeLookupLocators(LookupLocator[] locators)
Remove locators for specific lookup services from the set to join.
|
void |
removeMemberGroups(String[] groups)
Deletes the elements of the given set of names from the set whose
elements are the names of the groups in which the lookup service is
currently a member.
|
void |
setLookupGroups(String[] groups)
Replace the list of groups to join with a new list.
|
void |
setLookupLocators(LookupLocator[] locators)
Replace the list of locators of specific lookup services to join
with a new list.
|
void |
setMemberGroups(String[] groups)
Replaces the set whose elements are the names of the groups in which
the lookup service is currently a member with the given set of group
names.
|
void |
setUnicastPort(int port)
Changes the number of the port on which the lookup service is currently
listening for unicast discovery queries to the given port number.
|
String |
toString()
Returns a string created from the proxy class name, the registrar's
service ID, and the result of the underlying proxy's toString method.
|
private void |
writeObject(ObjectOutputStream out)
Writes the default serializable field value for this instance, followed
by the registrar's service ID encoded as specified by the
ServiceID.writeBytes method.
|
private static final long serialVersionUID
final Registrar server
transient ServiceID registrarID
static AdminProxy getInstance(Registrar server, ServiceID registrarID)
public Entry[] getLookupAttributes() throws RemoteException
JoinAdmin
getLookupAttributes
in interface JoinAdmin
RemoteException
public void addLookupAttributes(Entry[] attrSets) throws RemoteException
JoinAdmin
addLookupAttributes
in interface JoinAdmin
attrSets
- the attribute sets to addRemoteException
public void modifyLookupAttributes(Entry[] attrSetTemplates, Entry[] attrSets) throws RemoteException
JoinAdmin
modifyLookupAttributes
in interface JoinAdmin
attrSetTemplates
- the templates for matching attribute setsattrSets
- the modifications to make to matching setsRemoteException
ServiceRegistration.modifyAttributes(net.jini.core.entry.Entry[], net.jini.core.entry.Entry[])
public String[] getLookupGroups() throws RemoteException
JoinAdmin
getLookupGroups
in interface JoinAdmin
RemoteException
JoinAdmin.setLookupGroups(java.lang.String[])
public void addLookupGroups(String[] groups) throws RemoteException
JoinAdmin
addLookupGroups
in interface JoinAdmin
groups
- groups to joinRemoteException
JoinAdmin.removeLookupGroups(java.lang.String[])
public void removeLookupGroups(String[] groups) throws RemoteException
JoinAdmin
removeLookupGroups
in interface JoinAdmin
groups
- groups to leaveRemoteException
JoinAdmin.addLookupGroups(java.lang.String[])
public void setLookupGroups(String[] groups) throws RemoteException
JoinAdmin
setLookupGroups
in interface JoinAdmin
groups
- groups to joinRemoteException
JoinAdmin.getLookupGroups()
public LookupLocator[] getLookupLocators() throws RemoteException
JoinAdmin
getLookupLocators
in interface JoinAdmin
RemoteException
JoinAdmin.setLookupLocators(net.jini.core.discovery.LookupLocator[])
public void addLookupLocators(LookupLocator[] locators) throws RemoteException
JoinAdmin
addLookupLocators
in interface JoinAdmin
locators
- locators of specific lookup services to joinRemoteException
JoinAdmin.removeLookupLocators(net.jini.core.discovery.LookupLocator[])
public void removeLookupLocators(LookupLocator[] locators) throws RemoteException
JoinAdmin
removeLookupLocators
in interface JoinAdmin
locators
- locators of specific lookup services to leaveRemoteException
JoinAdmin.addLookupLocators(net.jini.core.discovery.LookupLocator[])
public void setLookupLocators(LookupLocator[] locators) throws RemoteException
JoinAdmin
setLookupLocators
in interface JoinAdmin
locators
- locators of specific lookup services to joinRemoteException
JoinAdmin.getLookupLocators()
public void addMemberGroups(String[] groups) throws RemoteException
DiscoveryAdmin
NO_GROUPS
) is input, this method takes no action.addMemberGroups
in interface DiscoveryAdmin
groups
- String
array consisting of the names of
the new, additional groups in which the lookup service
is to be a member.RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
server.public void removeMemberGroups(String[] groups) throws RemoteException
DiscoveryAdmin
NO_GROUPS
) is input, this
method takes no action.removeMemberGroups
in interface DiscoveryAdmin
groups
- String
array consisting of the names to
remove from the set whose elements are the names of the
groups in which the lookup service is currently a member.RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
server.public String[] getMemberGroups() throws RemoteException
DiscoveryAdmin
getMemberGroups
in interface DiscoveryAdmin
String
array consisting of the names of the groups
in which the lookup service is a memberRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
server.public void setMemberGroups(String[] groups) throws RemoteException
DiscoveryAdmin
NO_GROUPS
)
is input, then the lookup service will be a member of no groups.setMemberGroups
in interface DiscoveryAdmin
groups
- String
array consisting of the names of
the new groups in which the lookup service is to be a
member.RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
server.public int getUnicastPort() throws RemoteException
DiscoveryAdmin
getUnicastPort
in interface DiscoveryAdmin
int
representing the port number on which the
lookup service listens for unicast discovery queries.RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
server.public void setUnicastPort(int port) throws IOException, RemoteException
DiscoveryAdmin
setUnicastPort
in interface DiscoveryAdmin
port
- int
representing the new port number on which
the lookup service should listen for unicast discovery
queries.IOException
- because an invocation of this method will
result in the re-initiation of the unicast discovery process,
which can throw an IOException
when socket
allocation occurs.RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
server.public void destroy() throws RemoteException
DestroyAdmin
destroy
in interface DestroyAdmin
RemoteException
public Uuid getReferentUuid()
ReferentUuid
Uuid
that has been assigned to the
resource this proxy represents.getReferentUuid
in interface ReferentUuid
Uuid
associated with the
resource this proxy represents. Will not
return null
.public boolean equals(Object obj)
public String toString()
private void writeObject(ObjectOutputStream out) throws IOException
IOException
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
private void readObjectNoData() throws ObjectStreamException
ObjectStreamException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.