Examples of renew()


Examples of com.sun.jini.landlord.LeasePeriodPolicy.renew()

    throw throwNewUnknownLeaseException(cookie);
      }

      // No one can expire the lease, so it is safe to update.
      final LeasePeriodPolicy.Result r =
    policy.renew(resource, extension);

      if (log != null)
    log.renewOp((Uuid)cookie, r.expiration);

      resource.setExpiration(r.expiration);
View Full Code Here

Examples of com.sun.jini.landlord.LeasePeriodPolicy.renew()

    throw throwNewUnknownLeaseException(cookie);
      }

      // No one can expire the lease, so it is safe to update.
      final LeasePeriodPolicy.Result r =
    policy.renew(resource, extension);

      if (log != null)
    log.renewOp((Uuid)cookie, r.expiration);

      resource.setExpiration(r.expiration);
View Full Code Here

Examples of com.sun.xml.ws.security.secconv.WSSCContract.renew()

                //((ProcessingContextImpl)ctx).getIssuedTokenContextMap().put(sctId, itctx);
               
            } else if (requestType.toString().equals(wsTrustVer.getRenewRequestTypeURI())) {
                List<PolicyAssertion> policies = getOutBoundSCP(packet.getMessage());
                retAction = wsscVer.getSCTRenewResponseAction();
                rstr =  scContract.renew(rst, ictx,(SecureConversationToken)policies.get(0));
            } else if (requestType.toString().equals(wsTrustVer.getCancelRequestTypeURI())) {
                retAction = wsscVer.getSCTCancelResponseAction();
                rstr =  scContract.cancel(rst, ictx);
            } else {
                log.log(Level.SEVERE,
View Full Code Here

Examples of net.jini.core.lease.Lease.renew()

      }
      // try to renew until lease is expired.
      boolean canBeRenewed = true;
      while (canBeRenewed) {
    try {
        lease.renew(duration);
        renewalException = null;
        canBeRenewed = false;
        lastLeaseRenewed = lease;
        logger.log(Level.FINE, "Successfully renewed for " + duration +
                   " milliseconds.");
View Full Code Here

Examples of net.jini.core.lease.Lease.renew()

        for(int i=0;i<leaseList.size();i++) {
            Lease srvcLease = (Lease)(leaseList.get(i));
            logger.log(Level.FINE, "service lease["+i+"] changed to expire "
                              +"within "+(newLeaseDur/1000)+" second(s) -- "
                              +"simulates a down service");
            srvcLease.renew(newLeaseDur);
        }//end loop
        /* Remove all leases so we don't try to cancel them during shutdown. */
        leaseList.clear();
    }//end shortenLeases

View Full Code Here

Examples of net.jini.core.lease.Lease.renew()

        boolean leaseExpired = false;
        for(i=0;i<N_CYCLES_WAIT_EXPIRATION;i++) {
            DiscoveryServiceUtil.delayMS(2*actualDur);
            /* Verify the lease has expired by trying to renew the lease */
            try {
                lease.renew(duration);
            } catch (UnknownLeaseException e) { //expected exception
                leaseExpired = true;
                logger.log(Level.FINE,
                              "lease on the registration has expired");
                break;
View Full Code Here

Examples of net.jini.core.lease.Lease.renew()

                                 +serviceName);
        }
  Lease lease = getPreparedLease(reg);
  long[] expectedDurations = getRenewalDurations();
  for(int i=0;i<expectedDurations.length;i++) {
            lease.renew(expectedDurations[i]);
            long newDuration = DiscoveryServiceUtil.expirationToDuration
                                              (lease.getExpiration(),
                                               System.currentTimeMillis());
            logger.log(Level.FINE,
                              "expected lease duration["+i+"] = "
View Full Code Here

Examples of net.jini.core.lease.Lease.renew()

  logger.log(Level.INFO,
       "Awoken @: " + new Date(System.currentTimeMillis()));

  logger.log(Level.INFO, "Attempting to renew lease");
  try {
      lease.renew(DURATION);
      throw new TestException("Successfully renewed an expired lease");
  } catch (UnknownLeaseException ule) {
      logger.log(Level.INFO, "Caught expected exception upon renewal");
  }
    }
View Full Code Here

Examples of net.jini.core.lease.Lease.renew()

  logger.log(Level.INFO, "Sleeping for " + DURATION + " (ms)");
  Thread.sleep(DURATION + 1000);

  try {
      logger.log(Level.INFO, "Renewing registration lease");
      mrl.renew(DURATION);
      throw new TestException("Successfully renewed an "
          + "expired registration");
  } catch (UnknownLeaseException ule) {
      logger.log(Level.INFO, "Could not renew expired lease - OK");
  }
View Full Code Here

Examples of net.jini.core.lease.Lease.renew()

            throw new TestException(
    "Unsupported mailbox type requested" + mbType);
  }
  checkLease(mrl, DURATION);

        mrl.renew(DURATION);
  checkLease(mrl, DURATION);

  shutdown(0);

        mrl.renew(DURATION);
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.