Package net.jini.core.lookup

Examples of net.jini.core.lookup.ServiceMatches


  public void notify(RemoteEvent e)
  {
    //System.out.println(" -- JAMJobHandler Event received" +
    //                   e.getSource());
    try {
      ServiceMatches sm = ((ServiceRegistrar)
                           e.getSource()).lookup(template, 10);
      for(int h = 0; h < sm.items.length; h ++) {
        if(sm.items[h].service != null) {
          Entry attr [] = sm.items[h].attributeSets;
          // Looking for ServiceUIFactoryEntry object
View Full Code Here


   * @see ServiceBrowser#updateServiceList(ServiceMatches)
   */
  private void updateServiceList()
  {
    ServiceItem[] services;
    ServiceMatches sm;

    // Massage this into the current service browser's vectors.
    services = serviceCache.lookup(null, Integer.MAX_VALUE);

    sm = new ServiceMatches(services, services.length);
    updateServiceList(sm);
  }
View Full Code Here

     *        of objects returned equals the expected set of corresponding
     *        service items.
     */
    public void run() throws Exception {
  logger.log(Level.FINE, "in run() method.");
  ServiceMatches intfcM = null;

  for (int i=0; i<nClasses; i++) {
      for (int j=0; j<super.INTERFACES.length;j++) {
    if (super.INTFC_IMPL_MATRIX[i][j] == 0continue;
                    intfcM = proxy.lookup(intfcClassTmpls[i][j],
View Full Code Here

     *      found equals the number of matches expected; and that the set
     *      of objects returned equals the expected set of corresponding
     *      service items.
     */
    public void run() throws Exception {
  ServiceMatches exactM = null;
  for (int i=0; i<nClasses; i++) {
      exactM = proxy.lookup(exactClassTmpls[i],Integer.MAX_VALUE);
      if (exactM.totalMatches != expectedNMatchesExact[i]) {
    throw new TestException
        ("totalMatches ("+exactM.totalMatches+
View Full Code Here

     *        service items.
     *  @exception QATestException usually indicates test failure
     */
    public void run() throws Exception {
  logger.log(Level.FINE, "in run() method.");
  ServiceMatches superM = null;

  for (int i=0; i<nClasses; i++) {
      /** Loop from j = 1 because the chain starts with the class
       *  itself; and this test is testing only its super classes
       */
 
View Full Code Here

      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");
View Full Code Here

    public static void doLookup(ServiceItem[] srvcItems,
                                ServiceTemplate[] templates,
        ServiceRegistrar proxythrows Exception
    {
        Object serviceObj = null;
        ServiceMatches matches = null;
        for (int i=0; i<templates.length; i++) {
      serviceObj = proxy.lookup(templates[i]);
            if (!srvcItems[i].service.equals(serviceObj)) {
                throw new TestException("srvcItems["+i+
          "] != serviceObj returned by lookup()");
View Full Code Here

     * created during setup. Verifies that every simple lookup returns
     * a null object; and every match lookup returns zero matches.
     */
    private void doLookupNoMatch() throws TestException, RemoteException {
        Object serviceObj = null;
        ServiceMatches matches = null;
        for (int i=0; i<srvcIDTmpls.length; i++) {
      if(proxy.lookup(srvcIDTmpls[i]) != null) {
    throw new TestException("srvcIDTmpls["+i+"] != null");
      }
      matches = proxy.lookup(srvcIDTmpls[i],Integer.MAX_VALUE);
View Full Code Here

     *  Performs a match lookup using the template created during setup and
     *  zero maximum matches. Verifies that the expected number of services
     *  are returned by the call to lookup().
     */
    public void run() throws Exception {
  ServiceMatches matches = null;
  matches = proxy.lookup(tmpl,0);
  if (matches.totalMatches != expectedNMatches) {
      throw new TestException
                ("totalMatches ("+matches.totalMatches+
                 ") != expectedNMatches ("+expectedNMatches+")");
View Full Code Here

                                              ("AbstractBaseTest.verifyJoin");
        ArrayList srvcIDs = new ArrayList(lusList.size());
        for(int i=0;i<lusList.size();i++) {
            ServiceRegistrar reg = (ServiceRegistrar)lusList.get(i);
      /* Verify 1 service registered with lookup service i */
      ServiceMatches matches = reg.lookup(template,
            Integer.MAX_VALUE);
      if(matches.totalMatches == 0) {
    throw new TestException("lookup service "+i
                                        +" -- no matching service found");
      } else if(matches.totalMatches != 1) {
View Full Code Here

TOP

Related Classes of net.jini.core.lookup.ServiceMatches

Copyright © 2018 www.massapicom. 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.