All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.contek.invoker.binancespot.api.rest.user.UserRestRequest Maven / Gradle / Ivy

package io.contek.invoker.binancespot.api.rest.user;

import io.contek.invoker.binancespot.api.rest.RestRequest;
import io.contek.invoker.commons.actor.IActor;
import io.contek.invoker.commons.rest.RestContext;

import javax.annotation.concurrent.NotThreadSafe;
import java.time.Clock;

import static com.google.common.base.Preconditions.checkArgument;

@NotThreadSafe
abstract class UserRestRequest extends RestRequest {

  private final Clock clock;

  UserRestRequest(IActor actor, RestContext context) {
    super(actor, context);
    clock = actor.getClock();
    checkArgument(!actor.getCredential().isAnonymous());
  }

  long getMillis() {
    return clock.millis();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy