class FiddlerProxy extends Object implements Administrable, LookupDiscoveryService, ReferentUuid, Serializable
Modifier and Type | Class and Description |
---|---|
(package private) static class |
FiddlerProxy.ConstrainableFiddlerProxy
The constrainable version of the class
FiddlerProxy . |
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 |
FiddlerProxy(Fiddler server,
Uuid proxyID)
Constructs a new instance of FiddlerProxy.
|
Modifier and Type | Method and Description |
---|---|
static FiddlerProxy |
createServiceProxy(Fiddler server,
Uuid proxyID)
Public static factory method that creates and returns an instance of
FiddlerProxy . |
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 proxies to a lookup discovery service is defined by
reference equality.
|
Object |
getAdmin()
Returns a proxy object through which the lookup discovery service
for which the object on which this method is invoked serves as
proxy may be administered
|
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.
|
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.
|
LookupDiscoveryRegistration |
register(String[] groups,
LookupLocator[] locators,
RemoteEventListener listener,
MarshalledObject handback,
long leaseDuration)
Registers with the lookup discovery service.
|
private static final long serialVersionUID
final Fiddler server
final Uuid proxyID
private FiddlerProxy(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 FiddlerProxy createServiceProxy(Fiddler server, Uuid proxyID)
FiddlerProxy
. 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 proxyFiddlerProxy
that implements
RemoteMethodControl
if the given server
does.public Object getAdmin() throws RemoteException
getAdmin
in interface Administrable
RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
server.Administrable
public LookupDiscoveryRegistration register(String[] groups, LookupLocator[] locators, RemoteEventListener listener, MarshalledObject handback, long leaseDuration) throws RemoteException
register
in interface LookupDiscoveryService
groups
- String array, none of whose elements may be null,
consisting of zero or more names of groups to
which lookup services to discover belong.
A null value or an empty array
(net.jini.discovery.LookupDiscovery.ALL_GROUPS
or net.jini.discovery.LookupDiscovery.NO_GROUPS)
are both acceptable.locators
- array of zero or more non-null LookupLocator
objects, each corresponding to a specific lookup
service to discover. If either the empty array
or null is passed to this argument, then no
locator discovery will be performed for the
associated registration.listener
- a non-null instance of RemoteEventListener. This
argument specifies the entity that will receive
events notifying the registration that a lookup
service of interest has been discovered. A
non-null value must be passed to this argument,
otherwise a NullPointerException will be thrown
and the registration.handback
- null or an instance of MarshalledObject. This
argument specifies an object that will be
included in the notification event that the
lookup discovery service sends to the registered
listener.leaseDuration
- long value representing the amount of time (in
milliseconds) for which the resources of the
lookup discovery service are being requested.RemoteException
- typically, this exception occurs when
there is a communication failure between the client and the
server. When this exception does occur, the registration may
or may not have completed successfully.NullPointerException
- this exception occurs when
null is input to the listener parameter.LookupDiscoveryService
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 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.