コード例 #1
0
 public void setExpiresTime(int newExpires) {
   creationTime = System.currentTimeMillis();
   expiresTime = newExpires;
   extraTime = extraTime - newExpires;
   if (extraTime < newExpires) extraTime = 0;
   else extraTime = extraTime - newExpires;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
 /**
  * Returns remaining time of subscription
  *
  * @author Henrik Leion
  */
 public int getExpiresTime() {
   long temp = creationTime + expiresTime * 1000 - System.currentTimeMillis();
   return (int) temp / 1000;
 }
コード例 #4
0
 protected boolean hasExpired() {
   return ((creationTime + expiresTime * 1000) < System.currentTimeMillis());
 }