class FiddlerAdminProxy extends Object implements FiddlerAdmin, ReferentUuid, Serializable
Modifier and Type | Class and Description |
---|---|
(package private) static class |
FiddlerAdminProxy.ConstrainableFiddlerAdminProxy
The constrainable version of the class
FiddlerAdminProxy . |
Modifier and Type | Field and Description |
---|---|
(package private) Uuid |
proxyID
The unique identifier assigned to the current instance of this
proxy class by the lookup discovery service.
|
private static long |
serialVersionUID |
(package private) Fiddler |
server
The reference through which communication occurs between the
client-side and the server-side of the lookup discovery service
|
Modifier | Constructor and Description |
---|---|
private |
FiddlerAdminProxy(Fiddler server,
Uuid proxyID)
Constructs a new instance of FiddlerAdminProxy.
|
Modifier and Type | Method and Description |
---|---|
void |
addLookupAttributes(Entry[] attrSets)
Add attribute sets to the current set of attributes associated
with the lookup discovery service.
|
void |
addLookupGroups(String[] groups)
Add new names to the set consisting of the names of groups whose
members are lookup services the lookup discovery service wishes
to register with (join).
|
void |
addLookupLocators(LookupLocator[] locators)
Add a set of LookupLocator objects to the lookup discovery service's
managed set of locators.
|
static FiddlerAdminProxy |
createAdminProxy(Fiddler server,
Uuid proxyID)
Public static factory method that creates and returns an instance of
FiddlerAdminProxy . |
void |
destroy()
Destroy the lookup discovery service, if possible, including its
persistent storage.
|
boolean |
equals(Object obj)
For any instance of this class, indicates whether the object input
to this method is equal to the current instance of this class; where
equality of administrative proxies to a lookup discovery service is
defined by reference equality.
|
long |
getLeaseBound()
Retrieves the least upper bound applied to all lease durations granted
by the lookup discovery service.
|
Entry[] |
getLookupAttributes()
Get the current attribute sets for the lookup discovery service.
|
String[] |
getLookupGroups()
Get the names of the groups whose members are lookup services the
lookup discovery services wishes to register with (join).
|
LookupLocator[] |
getLookupLocators()
Get the lookup discovery service's managed set of locators.
|
int |
getPersistenceSnapshotThreshold()
Retrieve the value of the size threshold of the snapshot; which is
employed by the lookup discovery service in the test to determine
whether or not to take a "snapshot" of the system state.
|
float |
getPersistenceSnapshotWeight()
Retrieve the weight factor applied by the lookup discovery service
to the snapshot size during the test to determine whether or not to
take a "snapshot" of the system state.
|
Uuid |
getReferentUuid()
Returns the universally unique identifier that has been assigned to the
resource this proxy represents.
|
int |
hashCode()
For any instance of this class, returns the hashcode value generated
by the hashCode method of the proxy ID associated with the current
instance of this proxy.
|
void |
modifyLookupAttributes(Entry[] attrSetTemplates,
Entry[] attrSets)
Modify the current set of attributes associated with the lookup
discovery service.
|
private void |
readObject(ObjectInputStream s)
When an instance of this class is deserialized, this method is
automatically invoked.
|
private void |
readObjectNoData()
During deserialization of an instance of this class, if it is found
that the stream contains no data, this method is automatically
invoked.
|
void |
removeLookupGroups(String[] groups)
Remove a set of group names from lookup discovery service's managed
set of groups (the set consisting of the names of groups whose
members are lookup services the lookup discovery service wishes
to join).
|
void |
removeLookupLocators(LookupLocator[] locators)
Remove a set of LookupLocator objects from the lookup discovery
service's managed set of locators.
|
void |
setLeaseBound(long newBound)
Changes the least upper bound applied to all lease durations granted
by the lookup discovery service.
|
void |
setLookupGroups(String[] groups)
Replace the lookup discovery service's managed set of groups with a
new set of group names.
|
void |
setLookupLocators(LookupLocator[] locators)
Replace the lookup discovery service's managed set of locators with
a new set of locators.
|
void |
setPersistenceSnapshotThreshold(int threshold)
Change the value of the size threshold of the snapshot; which is
employed by the lookup discovery service in the test to determine
whether or not to take a "snapshot" of the system state.
|
void |
setPersistenceSnapshotWeight(float weight)
Change the weight factor applied by the lookup discovery service
to the snapshot size during the test to determine whether or not
to take a "snapshot" of the system state.
|
private static final long serialVersionUID
final Fiddler server
final Uuid proxyID
private FiddlerAdminProxy(Fiddler server, Uuid proxyID)
server
- reference to the server object through which
communication occurs between the client-side and
server-side of the associated serviceproxyID
- the unique identifier assigned by the service to each
instance of this proxypublic static FiddlerAdminProxy createAdminProxy(Fiddler server, Uuid proxyID)
FiddlerAdminProxy
. If the server associated with this proxy
implements RemoteMethodControl
, then the object returned by
this method will also implement RemoteMethodControl
.server
- reference to the server object through which
communication occurs between the client-side and
server-side of the associated service.proxyID
- the unique identifier assigned by the service to each
instance of this proxyFiddlerAdminProxy
that implements
RemoteMethodControl
if the given server
does.public void setLeaseBound(long newBound) throws RemoteException
This method is a mechanism for an entity with the appropriate privileges to administratively change the value of the least upper bound that will be applied by the Fiddler implementation of the lookup discovery service when determining the duration to assign to the lease on a requested registration.
setLeaseBound
in interface FiddlerAdmin
newBound
- long
value representing the new least
upper bound (in milliseconds) on the set of all possible
lease durations that may be grantedRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
bound value may or may not have been changed successfully.FiddlerAdmin.setLeaseBound(long)
public long getLeaseBound() throws RemoteException
getLeaseBound
in interface FiddlerAdmin
long
value representing the current least
upper bound (in milliseconds) on the set of all possible
lease durations that may be grantedRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service.FiddlerAdmin.setLeaseBound(long)
public void setPersistenceSnapshotWeight(float weight) throws RemoteException
setPersistenceSnapshotWeight
in interface FiddlerAdmin
weight
- weight factor for snapshot sizeRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
weight factor may or may not have been changed successfully.FiddlerAdmin.setPersistenceSnapshotWeight(float)
public float getPersistenceSnapshotWeight() throws RemoteException
getPersistenceSnapshotWeight
in interface FiddlerAdmin
RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service.FiddlerAdmin.getPersistenceSnapshotWeight()
public void setPersistenceSnapshotThreshold(int threshold) throws RemoteException
setPersistenceSnapshotThreshold
in interface FiddlerAdmin
threshold
- size threshold for taking a snapshotRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
threshold may or may not have been changed successfully.FiddlerAdmin.setPersistenceSnapshotThreshold(int)
public int getPersistenceSnapshotThreshold() throws RemoteException
getPersistenceSnapshotThreshold
in interface FiddlerAdmin
RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service.FiddlerAdmin.getPersistenceSnapshotThreshold()
public Entry[] getLookupAttributes() throws RemoteException
getLookupAttributes
in interface JoinAdmin
RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service.JoinAdmin.getLookupAttributes()
public void addLookupAttributes(Entry[] attrSets) throws RemoteException
addLookupAttributes
in interface JoinAdmin
attrSets
- array of net.jini.core.entry.Entry containing the
attribute sets to addRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
attributes may or may not have been added successfully.JoinAdmin.addLookupAttributes(net.jini.core.entry.Entry[])
public void modifyLookupAttributes(Entry[] attrSetTemplates, Entry[] attrSets) throws RemoteException
modifyLookupAttributes
in interface JoinAdmin
attrSetTemplates
- array of net.jini.core.entry.Entry containing
the templates for matching attribute setsattrSets
- array of net.jini.core.entry.Entry containing the
modifications to make to matching setsRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
attributes may or may not have been modified successfully.JoinAdmin.modifyLookupAttributes(net.jini.core.entry.Entry[], net.jini.core.entry.Entry[])
public String[] getLookupGroups() throws RemoteException
getLookupGroups
in interface JoinAdmin
If the array returned is empty, the lookup discovery service is configured to join no groups. If null is returned, the lookup discovery service is configured to join all groups.
RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service.JoinAdmin.getLookupGroups()
public void addLookupGroups(String[] groups) throws RemoteException
addLookupGroups
in interface JoinAdmin
groups
- String array containing the names of the groups to addRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
group names may or may not have been added successfully.JoinAdmin.addLookupGroups(java.lang.String[])
public void removeLookupGroups(String[] groups) throws RemoteException
removeLookupGroups
in interface JoinAdmin
groups
- String array containing the names of the groups to removeRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
group names may or may not have been removed successfully.JoinAdmin.removeLookupGroups(java.lang.String[])
public void setLookupGroups(String[] groups) throws RemoteException
setLookupGroups
in interface JoinAdmin
groups
- String array containing the names of the new groupsRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
group names may or may not have been replaced successfully.JoinAdmin.setLookupGroups(java.lang.String[])
public LookupLocator[] getLookupLocators() throws RemoteException
getLookupLocators
in interface JoinAdmin
RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service.JoinAdmin.getLookupLocators()
public void addLookupLocators(LookupLocator[] locators) throws RemoteException
Any lookup services corresponding to the new locators that the lookup discovery service has not yet joined, will be discovered and joined.
addLookupLocators
in interface JoinAdmin
locators
- array of net.jini.core.discovery.LookupLocator objects to add
to the managed set of locatorsRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
new locators may or may not have been added successfully.JoinAdmin.addLookupLocators(net.jini.core.discovery.LookupLocator[])
public void removeLookupLocators(LookupLocator[] locators) throws RemoteException
Note that any leases granted to the lookup discovery service by lookup services that do not correspond to any of the locators remaining in the managed set will be cancelled at those lookup services.
removeLookupLocators
in interface JoinAdmin
locators
- array of net.jini.core.discovery.LookupLocator objects to
remove from the managed set of locatorsRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
new locators may or may not have been removed successfully.JoinAdmin.removeLookupLocators(net.jini.core.discovery.LookupLocator[])
public void setLookupLocators(LookupLocator[] locators) throws RemoteException
Note that any leases granted to the lookup discovery service by lookup services whose corresponding locator is removed from the managed set will be cancelled at those lookup services. The lookup services corresponding to the new locators in the managed set will be discovered and joined.
setLookupLocators
in interface JoinAdmin
locators
- array of net.jini.core.discovery.LookupLocator objects with
which to replace the current managed set of locators
remove from the managed set of locatorsRemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
locators in the managed set may or may not have been replaced
successfully.JoinAdmin.setLookupLocators(net.jini.core.discovery.LookupLocator[])
public Uuid getReferentUuid()
getReferentUuid
in interface ReferentUuid
Uuid
that is associated with the
resource this proxy represents. This method will not return
null
.ReferentUuid
public void destroy() throws RemoteException
destroy
in interface DestroyAdmin
RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
lookup discovery service. When this exception does occur, the
lookup discovery service may or may not have been successfully
destroyed.DestroyAdmin.destroy()
public int hashCode()
public boolean equals(Object obj)
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
InvalidObjectException
- if the state of the
deserialized instance of this class is found to be invalid.IOException
ClassNotFoundException
private void readObjectNoData() throws InvalidObjectException
InvalidObjectException
- to indicate that there
was no data in the stream during deserialization of an
instance of this class; declaring that something is wrong.InvalidObjectException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.