Examples of ServiceItem


Examples of net.jini.core.lookup.ServiceItem

                ServiceItemReg itemReg = null;
                synchronized(serviceIdMap) {
                    itemReg = (ServiceItemReg)serviceIdMap.get(serviceID);
                }//end sync(serviceIdMap)
                if(itemReg != null) {
                    ServiceItem item = null;
                    ServiceItem filteredItem = null;
                    synchronized(itemReg) {
                        if(itemReg.filteredItem == null) {
                            item = new ServiceItem
                                              ( (itemReg.item).serviceID,
                                                (itemReg.item).service,
                                                (itemReg.item).attributeSets);
                            filteredItem = new ServiceItem
                                              ( (itemReg.item).serviceID,
                                                (itemReg.item).service,
                                                (itemReg.item).attributeSets);
                        }//endif
                    }//end sync(itemReg)
                    if(filteredItem != null) {//retry the filter
                        if( filterPassFail(filteredItem,filter) ) {
                            addFilteredItemToMap(item,filteredItem);
                        } else {//'quietly' remove the item
                            removeServiceIdMapSendNoEvent(serviceID);
                            return;
                        }//endif
                    }//endif
                    /* Either the filter was retried and passed, in which case,
                     * the filtered itemCopy was placed in the map; or the
                     * filter wasn't applied above (a non-null filteredItem
                     * field in the itemReg in the map means that the filter
                     * was applied at some previous time). In either case, the
                     * service can now be "un-discarded", and a notification
                     * that the service is now available can be sent.
                     */
                    ServiceItem itemToSend;
                    synchronized(itemReg) {
                        itemReg.setDiscarded(false);
                        itemToSend = itemReg.filteredItem;
                    }//end sync(itemReg)
                    addServiceNotify(itemToSend);
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

     @param evt a ServiceDiscoveryEvent object containing references to the
     *  service item corresponding to the event, including representations of
     *  the service's state both before and after the event.
     */
    public void serviceAdded(ServiceDiscoveryEvent evt) {
        ServiceItem postItem = evt.getPostEventServiceItem();

        if (VERBOSE) {
            System.out.println("Service appeared: "
                    + postItem.service.getClass().toString() + " with ID: "
                    + postItem.serviceID.toString());
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

     @param evt a ServiceDiscoveryEvent object containing references to the
     *  service item corresponding to the event, including representations of
     *  the service's state both before and after the event.
     */
    public void serviceChanged(ServiceDiscoveryEvent evt) {
        ServiceItem postItem = evt.getPostEventServiceItem();

        if (VERBOSE) {
            System.out.println("Service changed: "
                    + postItem.service.getClass().toString() + " with ID: "
                    + postItem.serviceID.toString());
View Full Code Here

Examples of org.apache.karaf.eik.workbench.provider.ServiceItem

                 */
                if (!mbeanProvider.isOpen()) {
                    return new Status(IStatus.WARNING, KarafWorkbenchActivator.PLUGIN_ID, "Connection to MBean server has been closed");
                }

                final ServiceItem serviceWrapper = new MBeanServiceItem(composite, mbeanProvider, idToBundleMap);

                synchronized (serviceSet) {
                    serviceSet.add(serviceWrapper);
                    idToServiceMap.put(service.getServiceId(), serviceWrapper);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.