Package com.sun.jini.reggie
Interface Registrar
- All Superinterfaces:
Administrable,DestroyAdmin,DiscoveryAdmin,JoinAdmin,Remote,ServiceProxyAccessor
- All Known Implementing Classes:
GigaRegistrar
public interface Registrar
extends Remote, ServiceProxyAccessor, Administrable, DiscoveryAdmin, JoinAdmin, DestroyAdmin
Registrar defines the private protocol between the various client-side proxies and the registrar
server.
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.
- Author:
- Sun Microsystems, Inc.
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttributes(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.voidcancelEventLease(long eventID, Uuid leaseID) Cancels an event lease.cancelLeases(Object[] regIDs, Uuid[] leaseIDs) Cancels service and event leases from a LeaseMap.voidcancelServiceLease(ServiceID serviceID, Uuid leaseID) Cancels a service lease.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.Returns a LookupLocator that can be used if necessary for unicast discovery of the lookup service.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.Returns the service object (i.e., just ServiceItem.service) from an item matching the template, or null if there is no match.Returns at most maxMatches items matching the template, plus the total number of items that match the template.voidmodifyAttributes(ServiceID serviceID, Uuid leaseID, EntryRep[] attrSetTmpls, EntryRep[] attrSets) Modifies existing attribute sets of a registered service item.notify(Template tmpl, int transitions, RemoteEventListener listener, MarshalledObject handback, long leaseDuration) Registers for event notification.notify(Template tmpl, int transitions, RemoteEventListener listener, MarshalledObject handback, long leaseDuration, int notifyType) Registers for event notification.Register a new service or re-register an existing service.longrenewEventLease(long eventID, Uuid leaseID, long duration) Renews an event lease.renewLeases(Object[] regIDs, Uuid[] leaseIDs, long[] durations) Renews service and event leases from a LeaseMap.longrenewServiceLease(ServiceID serviceID, Uuid leaseID, long duration) Renews a service lease.serviceDetails(ServiceID serviceID) Returns the service details of the service id.voidsetAttributes(ServiceID serviceID, Uuid leaseID, EntryRep[] attrSets) Deletes all of the service item's existing attributes, and replaces them with the specified attribute sets.Methods inherited from interface net.jini.admin.Administrable
getAdminMethods inherited from interface com.sun.jini.admin.DestroyAdmin
destroyMethods inherited from interface net.jini.lookup.DiscoveryAdmin
addMemberGroups, getMemberGroups, getUnicastPort, removeMemberGroups, setMemberGroups, setUnicastPortMethods inherited from interface net.jini.admin.JoinAdmin
addLookupAttributes, addLookupGroups, addLookupLocators, getLookupAttributes, getLookupGroups, getLookupLocators, modifyLookupAttributes, removeLookupGroups, removeLookupLocators, setLookupGroups, setLookupLocatorsMethods inherited from interface com.sun.jini.start.ServiceProxyAccessor
getServiceProxy
-
Method Details
-
register
Register a new service or re-register an existing service. -
serviceDetails
Returns the service details of the service id.- Throws:
RemoteException
-
lookup
Returns the service object (i.e., just ServiceItem.service) from an item matching the template, or null if there is no match.- Throws:
RemoteException- See Also:
-
lookup
Returns at most maxMatches items matching the template, plus the total number of items that match the template.- Throws:
RemoteException- See Also:
-
notify
RegistrarEventRegistration notify(Template tmpl, int transitions, RemoteEventListener listener, MarshalledObject handback, long leaseDuration) throws RemoteException Registers for event notification. -
notify
RegistrarEventRegistration notify(Template tmpl, int transitions, RemoteEventListener listener, MarshalledObject handback, long leaseDuration, int notifyType) throws RemoteException Registers for event notification. -
getEntryClasses
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. -
getFieldValues
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. The field name has been converted to an index (fields numbered from super to subclass). -
getServiceTypes
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. -
getLocator
Returns a LookupLocator that can be used if necessary for unicast discovery of the lookup service.- Throws:
RemoteException- See Also:
-
addAttributes
void addAttributes(ServiceID serviceID, Uuid leaseID, EntryRep[] attrSets) throws UnknownLeaseException, RemoteException Adds the specified attribute sets (those that aren't duplicates of existing attribute sets) to the registered service item. -
modifyAttributes
void modifyAttributes(ServiceID serviceID, Uuid leaseID, EntryRep[] attrSetTmpls, EntryRep[] attrSets) throws UnknownLeaseException, RemoteException Modifies existing attribute sets of a registered service item. -
setAttributes
void setAttributes(ServiceID serviceID, Uuid leaseID, EntryRep[] attrSets) throws UnknownLeaseException, RemoteException Deletes all of the service item's existing attributes, and replaces them with the specified attribute sets. -
cancelServiceLease
void cancelServiceLease(ServiceID serviceID, Uuid leaseID) throws UnknownLeaseException, RemoteException Cancels a service lease.- Throws:
UnknownLeaseExceptionRemoteException- See Also:
-
renewServiceLease
long renewServiceLease(ServiceID serviceID, Uuid leaseID, long duration) throws UnknownLeaseException, RemoteException Renews a service lease.- Throws:
UnknownLeaseExceptionRemoteException- See Also:
-
cancelEventLease
Cancels an event lease.- Throws:
UnknownLeaseExceptionRemoteException- See Also:
-
renewEventLease
long renewEventLease(long eventID, Uuid leaseID, long duration) throws UnknownLeaseException, RemoteException Renews an event lease.- Throws:
UnknownLeaseExceptionRemoteException- See Also:
-
renewLeases
Renews service and event leases from a LeaseMap.- Throws:
RemoteException- See Also:
-
cancelLeases
Cancels service and event leases from a LeaseMap.- Throws:
RemoteException- See Also:
-