Package net.jini.core.lookup

Examples of net.jini.core.lookup.ServiceItem


  attr3.setDefaults();
  attr3.i0_08 = new Integer(0);

  attrs = new Entry[]{attr0, attr1, attr2, attr3};

  reg = registerItem(new ServiceItem(null, new Long(0), attrs),
         getProxy());
    }
View Full Code Here


*/
public class RegisterNullService extends QATestRegistrar {

    public void run() throws Exception {
  try {
      getProxy().register(new ServiceItem(null, null, null),
        Long.MAX_VALUE);
      throw new TestException("register did not "
          + "throw NullPointerException");
  } catch (NullPointerException e) {
        }
View Full Code Here

    private ServiceRegistration reg;

    public void setup(QAConfig sysConfig) throws Exception {
  super.setup(sysConfig);
  reg = registerItem(new ServiceItem(null, new Long(0), null),
         getProxy());
    }
View Full Code Here

    private ServiceRegistration reg2;
    private LeaseMap lmap;

    public void setup(QAConfig sysConfig) throws Exception {
  super.setup(sysConfig);
  reg1 = registerItem(new ServiceItem(null, new Long(0), null),
          getProxy());
  reg2 = registerItem(new ServiceItem(null, new Long(1), null),
          getProxy());
  lmap = prepareRegistrationLeaseMap(getRegistrationLease(reg1).createLeaseMap(-500));
  lmap.put(getRegistrationLease(reg2), new Long(300));
    }
View Full Code Here

*/
public class RegisterInvalidServiceID extends QATestRegistrar {

    public void run() throws Exception {
  try {
      getProxy().register(new ServiceItem(getProxy().getServiceID(),
            new Long(0), null),
        Long.MAX_VALUE);
      throw new TestException("register did not "
          + "throw IllegalArgumentException");
  } catch (IllegalArgumentException e) {
View Full Code Here

    private ServiceRegistration reg;

    public void setup(QAConfig sysConfig) throws Exception {
  super.setup(sysConfig);
  reg = registerItem(new ServiceItem(null, new Long(0), null),
         getProxy());
    }
View Full Code Here

        }
        /* lookup(filter) */
        methodStr = new String("lookup(filter)");
        logger.log(Level.FINE, "invoking "+methodStr+" ...");
        try {
            ServiceItem srvcItem = cache.lookup(secondStageFilter);
            logger.log(Level.FINE, errStr+methodStr);
            failed = true;
        } catch(IllegalStateException e) {
            logger.log(Level.FINE, successStr+methodStr);
        }
View Full Code Here

        cache.discard(srvcItem.service);
        /* Again query the cache for the service. */
        logger.log(Level.FINE, "re-querying the cache for the "
                                        +"discarded service reference");
        srvcItem = cache.lookup(null);
        ServiceItem discardedSrvcItem = cache.lookup(null);
        if(discardedSrvcItem != null) { // failed
      if(discardedSrvcItem.service == null) {
    throw new TestException
        (" -- non-null service item returned, but "
         +"component of returned service is null");
View Full Code Here

             * lookup service(s) for the one registered service that both
             * matches the template and satisfies the filter
             */
            logger.log(Level.FINE, "  performing lookup -- "
                      +"srvcItem = srvcDiscoveryMgr.lookup(template,filter)");
            ServiceItem srvcItem = srvcDiscoveryMgr.lookup(template,
                                                           firstStageFilter);

            if(expectedService == null) {
                if(srvcItem != null) {
                    throw new TestException(" -- filter failed -- unexpected "
View Full Code Here

     */
    protected void applyTestDef() throws Exception {
        /* Through the service discovery manager, query the discovered lookup
         * service(s) for the desired services
         */
        ServiceItem srvcItem = srvcDiscoveryMgr.lookup(template,
                                                       firstStageFilter);
        if(srvcItem == null) {
            throw new TestException(" -- service returned is null");
        } else if(srvcItem.service == null) {
            throw new TestException(" -- service component of "
View Full Code Here

TOP

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

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.