public interface Registrar extends Remote, ServiceProxyAccessor, Administrable, DiscoveryAdmin, JoinAdmin, DestroyAdmin
The declared methods are pretty straightforward transformations of the ServiceRegistrar and ServiceRegistration interfaces, with external classes (ServiceItem, ServiceTemplate, ServiceMatches, Entry) converted to internal classes (Item, Template, Matches, EntryRep). In addition, there are methods for transformed Lease and LeaseMap interfaces, for service and event leases.
Modifier and Type | Method and Description |
---|---|
void |
addAttributes(ServiceID serviceID,
Uuid leaseID,
EntryRep[] attrSets)
Adds the specified attribute sets (those that aren't duplicates of existing attribute sets)
to the registered service item.
|
void |
cancelEventLease(long eventID,
Uuid leaseID)
Cancels an event lease.
|
Exception[] |
cancelLeases(Object[] regIDs,
Uuid[] leaseIDs)
Cancels service and event leases from a LeaseMap.
|
void |
cancelServiceLease(ServiceID serviceID,
Uuid leaseID)
Cancels a service lease.
|
EntryClassBase[] |
getEntryClasses(Template tmpl)
Looks at all service items that match the specified template, finds every entry (among those
service items) that either doesn't match any entry templates or is a subclass of at least one
matching entry template, and returns the set of the (most specific) classes of those
entries.
|
Object[] |
getFieldValues(Template tmpl,
int setIndex,
int field)
Looks at all service items that match the specified template, finds every entry (among those
service items) that matches tmpl.attributeSetTemplates[setIndex], and returns the set of
values of the specified field of those entries.
|
LookupLocator |
getLocator()
Returns a LookupLocator that can be used if necessary for unicast discovery of the lookup
service.
|
ServiceTypeBase[] |
getServiceTypes(Template tmpl,
String prefix)
Looks at all service items that match the specified template, and for every service item
finds the most specific type (class or interface) or types the service item is an instance of
that are neither equal to, nor a superclass of, any of the service types in the template and
that have names that start with the specified prefix, and returns the set of all such types.
|
MarshalledWrapper |
lookup(Template tmpl)
Returns the service object (i.e., just ServiceItem.service) from an item matching the
template, or null if there is no match.
|
Matches |
lookup(Template tmpl,
int maxMatches)
Returns at most maxMatches items matching the template, plus the total number of items that
match the template.
|
void |
modifyAttributes(ServiceID serviceID,
Uuid leaseID,
EntryRep[] attrSetTmpls,
EntryRep[] attrSets)
Modifies existing attribute sets of a registered service item.
|
RegistrarEventRegistration |
notify(Template tmpl,
int transitions,
RemoteEventListener listener,
MarshalledObject handback,
long leaseDuration)
Registers for event notification.
|
RegistrarEventRegistration |
notify(Template tmpl,
int transitions,
RemoteEventListener listener,
MarshalledObject handback,
long leaseDuration,
int notifyType)
Registers for event notification.
|
ServiceRegistration |
register(Item item,
long leaseDuration)
Register a new service or re-register an existing service.
|
long |
renewEventLease(long eventID,
Uuid leaseID,
long duration)
Renews an event lease.
|
RenewResults |
renewLeases(Object[] regIDs,
Uuid[] leaseIDs,
long[] durations)
Renews service and event leases from a LeaseMap.
|
long |
renewServiceLease(ServiceID serviceID,
Uuid leaseID,
long duration)
Renews a service lease.
|
ServiceDetails |
serviceDetails(ServiceID serviceID)
Returns the service details of the service id.
|
void |
setAttributes(ServiceID serviceID,
Uuid leaseID,
EntryRep[] attrSets)
Deletes all of the service item's existing attributes, and replaces them with the specified
attribute sets.
|
getServiceProxy
getAdmin
addMemberGroups, getMemberGroups, getUnicastPort, removeMemberGroups, setMemberGroups, setUnicastPort
addLookupAttributes, addLookupGroups, addLookupLocators, getLookupAttributes, getLookupGroups, getLookupLocators, modifyLookupAttributes, removeLookupGroups, removeLookupLocators, setLookupGroups, setLookupLocators
destroy
ServiceRegistration register(Item item, long leaseDuration) throws RemoteException
ServiceDetails serviceDetails(ServiceID serviceID) throws RemoteException
RemoteException
MarshalledWrapper lookup(Template tmpl) throws RemoteException
RemoteException
ServiceRegistrar.lookup(net.jini.core.lookup.ServiceTemplate)
Matches lookup(Template tmpl, int maxMatches) throws RemoteException
RemoteException
ServiceRegistrar.lookup(net.jini.core.lookup.ServiceTemplate)
RegistrarEventRegistration notify(Template tmpl, int transitions, RemoteEventListener listener, MarshalledObject handback, long leaseDuration) throws RemoteException
RegistrarEventRegistration notify(Template tmpl, int transitions, RemoteEventListener listener, MarshalledObject handback, long leaseDuration, int notifyType) throws RemoteException
EntryClassBase[] getEntryClasses(Template tmpl) throws RemoteException
Object[] getFieldValues(Template tmpl, int setIndex, int field) throws RemoteException
ServiceTypeBase[] getServiceTypes(Template tmpl, String prefix) throws RemoteException
LookupLocator getLocator() throws RemoteException
RemoteException
ServiceRegistrar.getLocator()
void addAttributes(ServiceID serviceID, Uuid leaseID, EntryRep[] attrSets) throws UnknownLeaseException, RemoteException
void modifyAttributes(ServiceID serviceID, Uuid leaseID, EntryRep[] attrSetTmpls, EntryRep[] attrSets) throws UnknownLeaseException, RemoteException
void setAttributes(ServiceID serviceID, Uuid leaseID, EntryRep[] attrSets) throws UnknownLeaseException, RemoteException
void cancelServiceLease(ServiceID serviceID, Uuid leaseID) throws UnknownLeaseException, RemoteException
UnknownLeaseException
RemoteException
Lease.cancel()
long renewServiceLease(ServiceID serviceID, Uuid leaseID, long duration) throws UnknownLeaseException, RemoteException
UnknownLeaseException
RemoteException
Lease.renew(long)
void cancelEventLease(long eventID, Uuid leaseID) throws UnknownLeaseException, RemoteException
UnknownLeaseException
RemoteException
Lease.cancel()
long renewEventLease(long eventID, Uuid leaseID, long duration) throws UnknownLeaseException, RemoteException
UnknownLeaseException
RemoteException
Lease.renew(long)
RenewResults renewLeases(Object[] regIDs, Uuid[] leaseIDs, long[] durations) throws RemoteException
RemoteException
LeaseMap.renewAll()
Exception[] cancelLeases(Object[] regIDs, Uuid[] leaseIDs) throws RemoteException
RemoteException
LeaseMap.cancelAll()
Copyright © GigaSpaces.