public void setExpiresTime(int newExpires) {
   creationTime = System.currentTimeMillis();
   expiresTime = newExpires;
   extraTime = extraTime - newExpires;
   if (extraTime < newExpires) extraTime = 0;
   else extraTime = extraTime - newExpires;
 }
 protected VirtualSubscription(String subscriberURI, Dialog d, int e) {
   this.dialog = d;
   this.expiresTime = e;
   this.subscribers = new HashMap();
   this.creationTime = System.currentTimeMillis();
   this.fullState = new String();
   this.extraTime = 0;
   this.subscriptionState = javax.sip.header.SubscriptionStateHeader.PENDING;
 }
 /**
  * Returns remaining time of subscription
  *
  * @author Henrik Leion
  */
 public int getExpiresTime() {
   long temp = creationTime + expiresTime * 1000 - System.currentTimeMillis();
   return (int) temp / 1000;
 }
 protected boolean hasExpired() {
   return ((creationTime + expiresTime * 1000) < System.currentTimeMillis());
 }