Package | Description |
---|---|
net.jini.core.lookup |
These are the lookup service interfaces and classes.
|
net.jini.lookup |
Standard utility classes for managing the join state of a service
and the service discovery duties of a client or service.
|
org.apache.river.example.browser |
A visualization tool for exploring Jini Network Technology
communities (djinns) with support for ServiceUI.
|
org.apache.river.reggie |
Provides implementations of
ServiceRegistrar . |
Modifier and Type | Field and Description |
---|---|
ServiceItem[] |
ServiceMatches.items
Matching items (up to maxMatches from lookup method).
|
Modifier and Type | Method and Description |
---|---|
ServiceItem |
ServiceItem.clone()
Clone has been implemented to allow utilities such as
ServiceDiscoveryManager to avoid sharing
internally stored instances with client code. |
abstract ServiceItem |
ServiceEvent.getServiceItem()
Returns the new state of the item, or null if the item was deleted
from the lookup service.
|
Modifier and Type | Method and Description |
---|---|
ServiceRegistration |
ServiceRegistrar.register(ServiceItem item,
long leaseDuration)
Register a new service or re-register an existing service.
|
Constructor and Description |
---|
ServiceMatches(ServiceItem[] items,
int totalMatches)
Simple constructor.
|
Modifier and Type | Field and Description |
---|---|
private ServiceItem |
ServiceDiscoveryManager.ServiceItemReg.filteredItem |
private ServiceItem |
ServiceDiscoveryManager.ServiceItemReg.item |
(package private) ServiceItem |
ServiceDiscoveryManager.LookupCacheImpl.ServiceNotifyDo.item |
(package private) ServiceItem |
ServiceDiscoveryManager.LookupCacheImpl.ServiceNotifyDo.oldItem |
private ServiceItem |
ServiceDiscoveryEvent.postEventItem
Represents the state of the service after the event.
|
private ServiceItem |
ServiceDiscoveryEvent.preEventItem
Represents the state of the service prior to the event.
|
private ServiceItem |
JoinManager.serviceItem
Contains the reference to the service that is to be registered with
all of the desired lookup services referenced by
discMgr . |
Modifier and Type | Field and Description |
---|---|
private List<ServiceItem> |
ServiceDiscoveryManager.ServiceDiscoveryListenerImpl.items |
private Map<ServiceRegistrar,ServiceItem> |
ServiceDiscoveryManager.ServiceItemReg.items |
Modifier and Type | Method and Description |
---|---|
private ServiceItem |
ServiceDiscoveryManager.LookupCacheImpl.addFilteredItemToMap(ServiceItem item,
ServiceItem filteredItem,
ServiceDiscoveryManager.ServiceItemReg itemReg)
Convenience method called by
filterMaybeDiscard that
finds the ServiceItemReg element in the
serviceIdMap that corresponds to the given
ServiceItem and, if such an element is found, replaces
the item field of that element with the given
item parameter; and sets the filteredItem
field of that element to the value contained in the
filteredItem parameter. |
private ServiceItem |
ServiceDiscoveryManager.LookupCacheImpl.filterMaybeDiscard(ServiceID srvcID,
ServiceDiscoveryManager.ServiceItemReg itemReg,
ServiceItem item,
boolean sendEvent)
Applies the first-stage
filter associated with the
current instance of LookupCache to the given
item and returns the resulting filtered item if the
filter is passed (or is null ); otherwise,
returns null and sends a service removed event if the
sendEvent parameter is true . |
private ServiceItem |
ServiceDiscoveryManager.LookupCacheImpl.findItem(ServiceID sid,
ServiceItem[] items)
Returns the element in the given items array having the given
ServiceID.
|
ServiceItem |
ServiceDiscoveryManager.ServiceItemReg.getFilteredItem() |
ServiceItem |
ServiceDiscoveryManager.ServiceItemReg.getItem() |
private ServiceItem |
ServiceDiscoveryManager.getMatchedServiceItem(ServiceMatches sm,
ServiceItemFilter filter)
From the given set of ServiceMatches, randomly selects and returns a
ServiceItem that matches the given filter (if applicable).
|
ServiceItem |
ServiceDiscoveryEvent.getPostEventServiceItem()
Returns an instance of a
ServiceItem containing the
service reference corresponding to the given event. |
ServiceItem |
ServiceDiscoveryEvent.getPreEventServiceItem()
Returns an instance of a
ServiceItem containing the
service reference corresponding to the given event. |
ServiceItem[] |
ServiceDiscoveryManager.ServiceDiscoveryListenerImpl.getServiceItem() |
private ServiceItem[] |
ServiceDiscoveryManager.LookupCacheImpl.getServiceItems(ServiceItemFilter filter2)
This method returns a
ServiceItem array containing
elements that satisfy the following conditions: - is referenced by
one of the itemReg elements contained in the
serviceIdMap - is not currently discarded - satisfies
the given ServiceItemFilter
Note that the filter parameter is a "2nd stage" filter. |
ServiceItem |
ServiceDiscoveryManager.LookupCacheImpl.lookup(ServiceItemFilter myFilter) |
ServiceItem |
LookupCache.lookup(ServiceItemFilter filter)
Finds a
ServiceItem object that satisfies the given
filter parameter. |
ServiceItem[] |
ServiceDiscoveryManager.LookupCacheImpl.lookup(ServiceItemFilter myFilter,
int maxMatches) |
ServiceItem[] |
LookupCache.lookup(ServiceItemFilter filter,
int maxMatches)
Finds an array of instances of
ServiceItem that each
satisfy the given filter parameter. |
ServiceItem[] |
ServiceDiscoveryManager.lookup(ServiceTemplate tmpl,
int minMatches,
int maxMatches,
ServiceItemFilter filter,
long waitDur)
Queries each available lookup service in the managed set for service(s)
that match the input criteria.
|
ServiceItem[] |
ServiceDiscoveryManager.lookup(ServiceTemplate tmpl,
int maxMatches,
ServiceItemFilter filter)
Queries each available lookup service in the managed set for service(s)
that match the input criteria.
|
ServiceItem |
ServiceDiscoveryManager.lookup(ServiceTemplate tmpl,
ServiceItemFilter filter)
Queries each available lookup service in the set of lookup services
managed by the
ServiceDiscoveryManager (the managed
set) for a service reference that matches criteria defined by the
entity that invokes this method. |
ServiceItem |
ServiceDiscoveryManager.lookup(ServiceTemplate tmpl,
ServiceItemFilter filter,
long waitDur)
Queries each available lookup service in the managed set for a service
that matches the input criteria.
|
ServiceItem |
ServiceDiscoveryManager.ServiceItemReg.removeProxy(ServiceRegistrar proxy) |
Modifier and Type | Method and Description |
---|---|
private ServiceItem |
ServiceDiscoveryManager.LookupCacheImpl.addFilteredItemToMap(ServiceItem item,
ServiceItem filteredItem,
ServiceDiscoveryManager.ServiceItemReg itemReg)
Convenience method called by
filterMaybeDiscard that
finds the ServiceItemReg element in the
serviceIdMap that corresponds to the given
ServiceItem and, if such an element is found, replaces
the item field of that element with the given
item parameter; and sets the filteredItem
field of that element to the value contained in the
filteredItem parameter. |
private void |
ServiceDiscoveryManager.LookupCacheImpl.addServiceNotify(ServiceItem item)
Sends a notification to all listeners when a ServiceItem has been
added.
|
private void |
ServiceDiscoveryManager.LookupCacheImpl.addServiceNotify(ServiceItem item,
ServiceDiscoveryListener srvcListener)
Sends a notification to the given listener when a ServiceItem has
been added.
|
private void |
ServiceDiscoveryManager.LookupCacheImpl.changeServiceNotify(ServiceItem newItem,
ServiceItem oldItem)
Sends a notification when a ServiceItem has been changed, but still
matches.
|
boolean |
ServiceItemFilter.check(ServiceItem item)
This method defines the implementation of the additional selection
criteria (additional matching and/or proxy preparation) to apply to a
ServiceItem object found
through standard template matching. |
private void |
ServiceDiscoveryManager.LookupCacheImpl.discardRetryLater(ServiceItem item,
boolean sendEvent,
ServiceDiscoveryManager.ServiceItemReg itemReg)
Convenience method called by
filterMaybeDiscard that
finds in the serviceIdMap , the
ServiceItemReg element corresponding to the given
ServiceItem , sets a service removed event, and queues a
ServiceDiscardTimerTask to retry the filter at a later
time. |
private ServiceItem |
ServiceDiscoveryManager.LookupCacheImpl.filterMaybeDiscard(ServiceID srvcID,
ServiceDiscoveryManager.ServiceItemReg itemReg,
ServiceItem item,
boolean sendEvent)
Applies the first-stage
filter associated with the
current instance of LookupCache to the given
item and returns the resulting filtered item if the
filter is passed (or is null ); otherwise,
returns null and sends a service removed event if the
sendEvent parameter is true . |
private boolean |
ServiceDiscoveryManager.filterPassed(ServiceItem item,
ServiceItemFilter filter)
Applies the given
filter to the given item , and
returns true if the filter returns a
pass value; otherwise, returns false . |
private ServiceItem |
ServiceDiscoveryManager.LookupCacheImpl.findItem(ServiceID sid,
ServiceItem[] items)
Returns the element in the given items array having the given
ServiceID.
|
private static boolean |
ServiceDiscoveryManager.isArrayContainsServiceItem(List<ServiceItem> a,
ServiceItem s)
Determines if the given ServiceItem is an element of the given array.
|
private void |
ServiceDiscoveryManager.LookupCacheImpl.itemMatchMatchChange(ServiceID srvcID,
ServiceDiscoveryManager.ServiceItemReg itemReg,
ServiceRegistrar proxy,
ServiceItem newItem,
boolean matchMatchEvent)
With respect to a given service (referenced by the parameter
newItem), if either an event has been received from the given lookup
service (referenced by the proxy parameter), or a snapshot of the
given lookup service's state has been retrieved, this method
determines whether the service's attributes have changed, or whether
a new version of the service has been registered.
|
private void |
ServiceDiscoveryManager.LookupCacheImpl.newOldService(ServiceDiscoveryManager.ProxyReg reg,
ServiceItem item,
boolean matchMatchEvent)
Method used to process the service state
("snapshot"), matching this cache's template, retrieved from
the given lookup service.
|
private void |
ServiceDiscoveryManager.LookupCacheImpl.notifyServiceMap(Object eventSource,
long eventID,
long seqNo,
ServiceID sid,
ServiceItem item,
int transition)
Called by the lookupListener's notify() method.
|
private static boolean |
ServiceDiscoveryEvent.nullCheck(Object source,
ServiceItem preEventItem,
ServiceItem postEventItem) |
boolean |
ServiceDiscoveryManager.ServiceItemReg.proxyNotUsedToTrackChange(ServiceRegistrar proxy,
ServiceItem item) |
private void |
ServiceDiscoveryManager.LookupCacheImpl.removeServiceNotify(ServiceItem item)
Sends a notification when a ServiceItem has been removed.
|
void |
ServiceDiscoveryManager.ServiceItemReg.replaceProxyUsedToTrackChange(ServiceRegistrar proxy,
ServiceItem item)
Replaces the proxy used to track change if the proxy passed in is non null,
also replaces the ServiceItem.
|
private boolean |
ServiceDiscoveryManager.LookupCacheImpl.sameVersion(ServiceItem item0,
ServiceItem item1)
Convenience method that performs a byte-wise comparison, including
codebases, of the services referenced by the given service items, and
returns the result.
|
private void |
ServiceDiscoveryManager.LookupCacheImpl.serviceNotifyDo(ServiceItem oldItem,
ServiceItem item,
int action)
Common code for performing service notification to all listeners.
|
void |
ServiceDiscoveryManager.ServiceItemReg.setFilteredItem(ServiceItem filteredItem) |
Modifier and Type | Method and Description |
---|---|
private static boolean |
ServiceDiscoveryManager.isArrayContainsServiceItem(List<ServiceItem> a,
ServiceItem s)
Determines if the given ServiceItem is an element of the given array.
|
Constructor and Description |
---|
ServiceDiscoveryEvent(Object source,
ServiceItem preEventItem,
ServiceItem postEventItem)
The constructor of
ServiceDiscoveryEvent takes
three arguments:
An instance of Object corresponding to the
instance of LookupCache from which the given event
originated
A ServiceItem reference representing the state
of the service (associated with the given event) prior to the
occurrence of the event
A ServiceItem reference representing the state
of the service after the occurrence of the event
If null is passed as the source parameter for the
constructor, a NullPointerException will be thrown. |
ServiceDiscoveryEvent(Object source,
ServiceItem preEventItem,
ServiceItem postEventItem,
boolean check) |
ServiceItemReg(ServiceRegistrar proxy,
ServiceItem item) |
ServiceNotifyDo(ServiceItem oldItem,
ServiceItem item,
int action,
ServiceDiscoveryListener sl,
LookupCache lookupCache) |
Modifier and Type | Field and Description |
---|---|
private ServiceItem |
ServiceEditor.item |
private ServiceItem |
ServiceBrowser.AttributePanel.item |
private ServiceItem |
Browser.ServiceListItem.item |
protected ServiceItem |
Browser.ServiceListPopup.item |
protected ServiceItem |
ServiceEditor.UIDescriptorPopup.serviceItem |
private ServiceItem |
ServiceEditor.MouseReceiver.serviceItem |
protected ServiceItem |
ServiceBrowser.UIDescriptorPopup.serviceItem |
private ServiceItem |
ServiceBrowser.MouseReceiver.serviceItem |
Modifier and Type | Method and Description |
---|---|
ServiceItem |
Browser.ServiceListItem.getServiceItem() |
Modifier and Type | Method and Description |
---|---|
void |
ServiceEditor.UIDescriptorPopup.setServiceItem(ServiceItem anItem) |
void |
ServiceBrowser.UIDescriptorPopup.setServiceItem(ServiceItem anItem) |
Constructor and Description |
---|
AttributePanel(ServiceItem item,
ServiceRegistrar registrar) |
MouseReceiver(ServiceItem aServiceItem,
ServiceBrowser.UIDescriptorPopup popup) |
MouseReceiver(ServiceItem aServiceItem,
ServiceEditor.UIDescriptorPopup popup) |
ServiceBrowser(ServiceItem item,
ServiceRegistrar registrar,
Browser browser) |
ServiceEditor(ServiceItem item,
Object admin,
ServiceRegistrar registrar,
Browser browser) |
ServiceListItem(ServiceItem item) |
Modifier and Type | Method and Description |
---|---|
ServiceItem |
Item.get()
Convert back to a ServiceItem.
|
ServiceItem |
RegistrarEvent.getServiceItem()
Returns the new state of the serviceItem, or null if the serviceItem was deleted
from the lookup service.
|
static ServiceItem[] |
Item.toServiceItem(List reps)
Converts an ArrayList of Item to an array of ServiceItem.
|
Modifier and Type | Method and Description |
---|---|
ServiceRegistration |
RegistrarProxy.register(ServiceItem srvItem,
long leaseDuration) |
Constructor and Description |
---|
Item(ServiceItem item)
Converts a ServiceItem to an Item.
|
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.