Пример #1
0
  public String getAccessToken() {
    if (this.atExpiration > System.currentTimeMillis()) return (this.accessToken);

    // else
    synchronized (this) {
      if (this.atExpiration > System.currentTimeMillis()) return (this.accessToken);

      this.retrieveAccessToken();

      return (this.accessToken);
    }
  }
Пример #2
0
  public String getJSSDKTicket() {
    if (this.jtExpiration > System.currentTimeMillis()) return (this.jssdkTicket);

    // else
    synchronized (this) {
      if (this.jtExpiration > System.currentTimeMillis()) return (this.jssdkTicket);

      this.retrieveJSSDKTicket();

      return (this.jssdkTicket);
    }
  }