com.sun.jini.norm
Interface NormServer
- All Superinterfaces:
- Administrable, DestroyAdmin, JoinAdmin, Landlord, LeaseRenewalService, Remote, ServiceProxyAccessor
- All Known Implementing Classes:
- ActivatableNormServerImpl, NormServerBaseImpl, PersistentNormServerImpl, TransientNormServerImpl
interface NormServer
- extends Landlord, LeaseRenewalService, Administrable, JoinAdmin, DestroyAdmin, ServiceProxyAccessor, Remote
This interface is the private wire protocol to that the various
proxy objects created by a Norm server (the lease renewal service
itself, sets, leases, admins, etc.) use to communicate back to the
server.
- Author:
- Sun Microsystems, Inc.
Field Summary |
static long |
NO_LISTENER
If calling setExpirationWarningListener with a
null listener, this is the value that should be passed. |
Methods inherited from interface net.jini.admin.JoinAdmin |
addLookupAttributes, addLookupGroups, addLookupLocators, getLookupAttributes, getLookupGroups, getLookupLocators, modifyLookupAttributes, removeLookupGroups, removeLookupLocators, setLookupGroups, setLookupLocators |
NO_LISTENER
static final long NO_LISTENER
- If calling
setExpirationWarningListener
with a
null
listener, this is the value that should be passed.
- See Also:
- Constant Field Values
renewFor
void renewFor(Uuid id,
Lease leaseToRenew,
long membershipDuration,
long renewDuration)
throws RemoteException,
ThrowThis
- Add a lease to a set.
- Parameters:
id
- what set the lease should be added toleaseToRenew
- the lease to be added to the setmembershipDuration
- how long the lease should be in the setrenewDuration
- how long the lease should be renewed for
each time it is renewed
- Throws:
ThrowThis
- when another exception has to be thrown by the proxy
RemoteException
- if a communication-related exception occurs
remove
Lease remove(Uuid id,
Lease leaseToRemove)
throws RemoteException,
ThrowThis
- Remove a lease from a set.
- Parameters:
id
- of set being operated onleaseToRemove
- the lease to be removed from the set
- Throws:
ThrowThis
- when another exception has to be thrown by the proxy
RemoteException
- if a communication-related exception occurs
getLeases
GetLeasesResult getLeases(Uuid id)
throws RemoteException,
ThrowThis
- Return all the leases in the set. Returns
null
or a zero-length array if there are no leases in the set.
- Parameters:
id
- of set being operated on
- Returns:
- an object containing an array of
MarshalledInstance
s,
one for each lease
- Throws:
ThrowThis
- when another exception has to be thrown by the proxy
RemoteException
- if a communication-related exception occurs
setExpirationWarningListener
EventRegistration setExpirationWarningListener(Uuid id,
RemoteEventListener listener,
long minWarning,
MarshalledObject handback)
throws RemoteException,
ThrowThis
- Set the expiration warning listener for a set. Also used to
cancel a registration.
- Parameters:
id
- of set being operated onlistener
- listener to be notified when this event occurs.
Pass null
to clear the registration.minWarning
- how long be for the lease on the set expires
should the event be sent. Ignored if listener
is null
.handback
- an object to be handed back to the listener when
the warning event occurs. Ignored if listener
is null
.
- Returns:
- an
EventRegistration
object for the new
registration if listener
is
non-null
and null
otherwise
- Throws:
ThrowThis
- when another exception has to be thrown by the proxy
RemoteException
- if a communication-related exception occurs
setRenewalFailureListener
EventRegistration setRenewalFailureListener(Uuid id,
RemoteEventListener listener,
MarshalledObject handback)
throws RemoteException,
ThrowThis
- Set the renewal failure listener for a set. Also used to
cancel a registration.
- Parameters:
id
- of set being operated onlistener
- listener to be notified when this event occurs.
Pass null
to clear the registration.handback
- an object to be handed back to the listener when
the failure event occurs. Ignored if
listener
is null
.
- Returns:
- an
EventRegistration
object for the new
registration if listener
is
non-null
and null
otherwise.
- Throws:
ThrowThis
- when another exception has to be thrown by the proxy
RemoteException
- if a communication-related exception occurs
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.