Package com.sun.jini.landlord
Class LeaseFactory
java.lang.Object
com.sun.jini.landlord.LeaseFactory
Factory for
LandlordLease instances.- Since:
- 2.0
- Author:
- Sun Microsystems, Inc.
-
Constructor Summary
ConstructorsConstructorDescriptionLeaseFactory(Landlord landlord, Uuid landlordUuid) Create a newLeaseFactorythat will createLandlordLeases with the specifiedLandlordand landlordUuid. -
Method Summary
Modifier and TypeMethodDescriptionReturn aTrustVerifierthat will verify the proxies produced by this factory.Return a newLandlordLeasewith the specified initial expiration and cookie using the inner proxy andUuidthe factory was created with.newTransactionLease(Uuid cookie, long expiration) Return a newMahaloTxnLeasewith the specified initial expiration and cookie using the inner proxy andUuidthe factory was created with.
-
Constructor Details
-
LeaseFactory
Create a newLeaseFactorythat will createLandlordLeases with the specifiedLandlordand landlordUuid.- Parameters:
landlord- the inner proxy that the leases will use to communicate back to the server.landlordUuid- a universally unique id that has been assigned to the server granting of the lease. Ideally theUuidlandlord.getUuidwould return iflandlordimplementedReferentUuid. Used to determine when two leases can be batched together.- Throws:
NullPointerException- if either argument isnull
-
-
Method Details
-
newLease
Return a newLandlordLeasewith the specified initial expiration and cookie using the inner proxy andUuidthe factory was created with. Will return aConstrainableLandlordLeaseif inner proxy this factory was created with implementsRemoteMethodControl.- Parameters:
cookie- aUuidthat will universally and uniquely identify the leaseexpiration- the initial expiration time of the lease.- Returns:
- a new
LandlordLease. - Throws:
NullPointerException- if thecookieargument isnull.
-
newTransactionLease
Return a newMahaloTxnLeasewith the specified initial expiration and cookie using the inner proxy andUuidthe factory was created with. Will return aConstrainableLandlordLeaseif inner proxy this factory was created with implementsRemoteMethodControl.- Parameters:
cookie- aUuidthat will universally and uniquely identify the leaseexpiration- the initial expiration time of the lease.- Returns:
- a new
LandlordLease. - Throws:
NullPointerException- if thecookieargument isnull.
-
getVerifier
Return aTrustVerifierthat will verify the proxies produced by this factory. Currently the verifier returned will be an instance ofLandlordProxyVerifier.- Returns:
- a new
TrustVerifier. - Throws:
UnsupportedOperationException- if theLandlordthis factory was created with does not implement bothRemoteMethodControlandTrustEquivalence.
-