Examples of ServiceItem


Examples of net.jini.core.lookup.ServiceItem

   * Vector).  Used by AppAgent, which provides its own LookupCache
   * of queue services.
   */
  public ServiceItem getServiceItem(int index, LookupCache serviceCache)
  {
    ServiceItem service;
    final int myIndex = index;

    service = serviceCache.lookup(new ServiceItemFilter() {
      public boolean check(ServiceItem svc) {
  return svc.serviceID.equals(getServiceID(myIndex));
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

      queueList = new ArrayList();
      joiners = new ArrayList();
      leaseList = new Vector();
      creatorListener = new ServiceCreatorListener();
      destroyListener = new JobDestroyListener();
      ServiceItem si;
      ServiceTemplate st;
      LookupDiscoveryManager discovery = new
        LookupDiscoveryManager(spaceGroups, locators, null);
      ServiceDiscoveryManager serviceDiscoveryManager = new
        ServiceDiscoveryManager(discovery, null);
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

    queueList = new ArrayList();
    joiners = new ArrayList();
    leaseList = new Vector();
    creatorListener = new ServiceCreatorListener();
    destroyListener = new JobDestroyListener();
    ServiceItem si;
    LookupDiscovery discovery = new
      LookupDiscovery(LookupDiscovery.NO_GROUPS);
    discovery.addGroups(spaceGroups);
    ServiceDiscoveryManager serviceDiscoveryManager = new
      ServiceDiscoveryManager(discovery, null);
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

  public void actionPerformed(ActionEvent e)
  {
    if (e.getActionCommand().equals("Submit")) {
      int index = list.getSelectedIndex();
      if(index > -1) {
        ServiceItem queueItem = browser.getServiceItem(index, serviceCache);
        Entry queueAttrs[] = queueItem.attributeSets;
       
        // Find Name of service (there's got to be an easier way XXX)
        for (int i=0; i<queueAttrs.length; ++i) {
          if (queueAttrs[i] instanceof Name) {
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

  public void mouseClicked(MouseEvent e)
  {
    if(e.getClickCount() > 1) {
      int index = list.getSelectedIndex();
      //Show Compute Monitor
      ServiceItem queueItem = browser.getServiceItem(index, serviceCache);
      Entry queueAttrs[] = queueItem.attributeSets;
      QueueInterface queue = (QueueInterface)queueItem.service;

      // Find Name of service (there's got to be an easier way XXX)
      for (int i=0; i<queueAttrs.length; ++i) {
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

   *
   *
   */
  public void serviceAdded(ServiceDiscoveryEvent e)
  {
    ServiceItem si = e.getPostEventServiceItem();
    ServiceListModel model = (ServiceListModel)queueList.getModel();
    model.addElement(si);
  }
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

   *
   *
   */
  public void serviceRemoved(ServiceDiscoveryEvent e)
  {
    ServiceItem si = e.getPreEventServiceItem();
    ServiceListModel model = (ServiceListModel)queueList.getModel();
    model.removeElement(si);
  }
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

   *
   *
   */
  public void serviceChanged(ServiceDiscoveryEvent e)
  {
    ServiceItem si = e.getPreEventServiceItem();
    ServiceListModel model = (ServiceListModel)queueList.getModel();
    model.update(si, e.getPostEventServiceItem());
  }
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

  private QueueInterface getQueueService(int index)
    throws IOException
  {
    final ServiceID id =
      ((ServiceListModel)queueList.getModel()).getServiceID(index);
    ServiceItem si = lookupCache.lookup(new ServiceItemFilter() {

      public boolean check(ServiceItem item) {
        if(item.serviceID.equals(id))
          return true;
        return false;
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

      for (int j = i + 1; j < eventVector.size(); j++) {
    ServiceEvent oevnt = (ServiceEvent)eventVector.elementAt(j);
    if (evnt.getServiceID().equals(oevnt.getServiceID()))
        continue outer;
      }
      ServiceItem item = evnt.getServiceItem();
      tmpl.serviceID = evnt.getServiceID();
      ServiceRegistrar proxy = (ServiceRegistrar)evnt.getSource();
      proxy = (ServiceRegistrar)
        QAConfig.getConfig().prepare("test.reggiePreparer",
                  proxy);
      ServiceMatches matches;
      matches = proxy.lookup(tmpl, 1);
      if (item == null) {
    if (matches.items.length != 0)
        throw new TestException(
            "verifyEventItems: event item is null, lookup returns non-null");
      } else {
    if (matches.items.length == 0)
        throw new TestException(
            "verifyEventItems: event item is non-null, lookup returns null");
    ServiceItem litem = matches.items[0];
    if (!item.service.equals(litem.service))
        throw new TestException(
            "verifyEventItems: event item service does not equal lookup value");
    if (!attrsEqual(item.attributeSets, litem.attributeSets))
         throw new TestException(
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.