com.sun.jini.norm
Class SetProxy.ConstrainableSetProxy

java.lang.Object
  extended by com.sun.jini.norm.AbstractProxy
      extended by com.sun.jini.norm.SetProxy
          extended by com.sun.jini.norm.SetProxy.ConstrainableSetProxy
All Implemented Interfaces:
Serializable, RemoteMethodControl, ReferentUuid, LeaseRenewalSet
Enclosing class:
SetProxy

static final class SetProxy.ConstrainableSetProxy
extends SetProxy
implements RemoteMethodControl

Defines a subclass of SetProxy that implements RemoteMethodControl.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.jini.norm.SetProxy
SetProxy.ConstrainableSetProxy
 
Field Summary
private  MethodConstraints methodConstraints
          The client constraints placed on this proxy or null.
private static Method[] methodMap1
          Mappings from client to server methods, using the client method with more arguments for each server method when more than one client method maps to a single server method.
private static Method[] methodMap2
          Second set of mappings from client to server method names, for server methods with a second associated client method.
private static long serialVersionUID
           
private  NormServer server2
          A second inner proxy to use when the client constraints for different smart proxy methods implemented by the same inner proxy methods have different constraints.
 
Fields inherited from class com.sun.jini.norm.SetProxy
ourLease
 
Fields inherited from class com.sun.jini.norm.AbstractProxy
server, uuid
 
Fields inherited from interface net.jini.lease.LeaseRenewalSet
EXPIRATION_WARNING_EVENT_ID, RENEWAL_FAILURE_EVENT_ID
 
Constructor Summary
SetProxy.ConstrainableSetProxy(NormServer server, Uuid id, Lease lease, MethodConstraints methodConstraints)
          Creates an instance of this class.
 
Method Summary
private static NormServer constrainServer(NormServer server, MethodConstraints methodConstraints, Method[] mappings)
          Returns a copy of the server proxy with the specified client constraints and methods mapping.
 MethodConstraints getConstraints()
          inherit javadoc
private  ProxyTrustIterator getProxyTrustIterator()
          Returns a proxy trust iterator that supplies the server, for use by ProxyTrustVerifier.
private  void readObject(ObjectInputStream s)
          Verifies that ourLease is a ConstrainableLandlordLease, and that server implements RemoteMethodControl and has the appropriate method constraints.
(package private)  NormServer server2()
          Returns the second server proxy.
 RemoteMethodControl setConstraints(MethodConstraints constraints)
          inherit javadoc
 
Methods inherited from class com.sun.jini.norm.SetProxy
clearExpirationWarningListener, clearRenewalFailureListener, create, getLeases, getRenewalSetLease, remove, renewFor, renewFor, setExpirationWarningListener, setRenewalFailureListener
 
Methods inherited from class com.sun.jini.norm.AbstractProxy
equals, getReferentUuid, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

methodMap1

private static final Method[] methodMap1
Mappings from client to server methods, using the client method with more arguments for each server method when more than one client method maps to a single server method.


methodMap2

private static final Method[] methodMap2
Second set of mappings from client to server method names, for server methods with a second associated client method.


methodConstraints

private MethodConstraints methodConstraints
The client constraints placed on this proxy or null.


server2

private transient NormServer server2
A second inner proxy to use when the client constraints for different smart proxy methods implemented by the same inner proxy methods have different constraints. This proxy is used for the renewFor(Lease, long), clearExpirationWarningListener, and clearRenewalFailureListener methods.

Constructor Detail

SetProxy.ConstrainableSetProxy

SetProxy.ConstrainableSetProxy(NormServer server,
                               Uuid id,
                               Lease lease,
                               MethodConstraints methodConstraints)
Creates an instance of this class.

Method Detail

readObject

private void readObject(ObjectInputStream s)
                 throws IOException,
                        ClassNotFoundException
Verifies that ourLease is a ConstrainableLandlordLease, and that server implements RemoteMethodControl and has the appropriate method constraints. Also sets the server2 field.

Throws:
IOException
ClassNotFoundException

constrainServer

private static NormServer constrainServer(NormServer server,
                                          MethodConstraints methodConstraints,
                                          Method[] mappings)
Returns a copy of the server proxy with the specified client constraints and methods mapping.


setConstraints

public RemoteMethodControl setConstraints(MethodConstraints constraints)
inherit javadoc

Specified by:
setConstraints in interface RemoteMethodControl
Parameters:
constraints - client constraints, or null
Returns:
a new copy of this proxy with the client constraints set to the specified constraints
See Also:
RemoteMethodControl.getConstraints()

getConstraints

public MethodConstraints getConstraints()
inherit javadoc

Specified by:
getConstraints in interface RemoteMethodControl
Returns:
the client constraints, or null
See Also:
RemoteMethodControl.setConstraints(net.jini.core.constraint.MethodConstraints)

server2

NormServer server2()
Returns the second server proxy.

Overrides:
server2 in class SetProxy

getProxyTrustIterator

private ProxyTrustIterator getProxyTrustIterator()
Returns a proxy trust iterator that supplies the server, for use by ProxyTrustVerifier.



Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.