net.shibboleth.utilities.java.support.annotation.Duration.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中net.shibboleth.utilities.java.support.annotation.Duration.<init>()方法的一些代码示例,展示了Duration.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Duration.<init>()方法的具体详情如下:
包路径:net.shibboleth.utilities.java.support.annotation.Duration
类名称:Duration
方法名:<init>

Duration.<init>介绍

暂无

代码示例

代码示例来源:origin: org.opensaml/opensaml-saml-impl

/**
 * Set the maximum interval, in milliseconds, between now and the <code>validUntil</code> date.
 * A value of less than 1 indicates that there is no restriction.
 * 
 * @param validity time in milliseconds between now and the <code>validUntil</code> date
 */
@Duration public void setMaxValidityInterval(@Duration final long validity) {
  maxValidityInterval = validity;
}

代码示例来源:origin: net.shibboleth.idp/idp-attribute-resolver-spring

/**
 * Converts the supplied duration to milliseconds and divides it by the divisor. Useful for modifying durations
 * while resolving property replacement.
 * 
 * @param duration the duration (which may have gone through spring translation from iso to long)
 * @param divisor to modify the duration with
 * 
 * @return result of the division
 */
@Duration public static long buildDuration(@Duration final long duration, final long divisor) {
  return duration / divisor;
}

代码示例来源:origin: net.shibboleth.idp/idp-attribute-resolver-spring

/**
 * Data Connector property "noRetryDelay".
 * 
 * @return the value of property to set or null if never set
 */
@Nullable @Duration public Long getNoRetryDelay() {
  return noRetryDelay;
}

代码示例来源:origin: net.shibboleth.idp/idp-profile-api

/**
 * Set the system time offset, which affects the reference date for comparisons.
 * By default all comparisons are against system time, i.e. zero offset.
 *
 * @param offset System time offset. A negative value decreases the target date (sooner);
 *                         a positive value increases the target date (later).
 */
@Duration public void setOffset(@Duration final long offset) {
  systemTimeOffset = org.joda.time.Duration.millis(offset);
}

代码示例来源:origin: org.opensaml/opensaml-saml-impl

/**
 * Set the artifact entry lifetime in milliseconds.
 * 
 * @param lifetime artifact entry lifetime in milliseconds
 */
@Duration public void setArtifactLifetime(@Duration @Positive final long lifetime) {
  artifactLifetime = Constraint.isGreaterThan(0, lifetime, "Artifact lifetime must be greater than zero");
}

代码示例来源:origin: net.shibboleth.idp/idp-profile-api

/** {@inheritDoc} */
  @Override
  @Nullable @Positive @Duration public Long getStorageExpiration() {
    return storageExpiration;
  }
}

代码示例来源:origin: net.shibboleth.idp/idp-session-api

/**
 * Set the last activity instant, in milliseconds since the epoch, for the session.
 * 
 * @param instant last activity instant, in milliseconds since the epoch, for the session, must be greater than 0
 * @throws SessionException if an error occurs updating the session
 */
@Duration public void setLastActivityInstant(@Duration @Positive final long instant) throws SessionException {
  doSetLastActivityInstant(instant);
}

代码示例来源:origin: org.opensaml/opensaml-saml-impl

/**
 * Get the clock skew.
 * 
 * @return the clock skew
 */
@NonNegative @Duration public long getClockSkew() {
  return clockSkew;
}

代码示例来源:origin: org.opensaml/opensaml-saml-impl

/**
 * Set the artifact entry lifetime in milliseconds.
 * 
 * @param lifetime artifact entry lifetime in milliseconds
 */
@Duration public void setArtifactLifetime(@Duration @Positive final long lifetime) {
  artifactLifetime = Constraint.isGreaterThan(0, lifetime, "Artifact lifetime must be greater than zero");
}

代码示例来源:origin: net.shibboleth.idp/idp-saml-impl

/**
 * Get the SQL query timeout.
 * 
 * @return the timeout in milliseconds
 */
@NonNegative @Duration public long getQueryTimeout() {
  return queryTimeout;
}

代码示例来源:origin: net.shibboleth.idp/idp-session-api

/**
 * Set the last activity instant, in milliseconds since the epoch, for the session.
 * 
 * <p>This manipulates only the internal state of the object. The {@link #setLastActivityInstant(long)}
 * method must be overridden to support other persistence requirements.</p>
 * 
 * @param instant last activity instant, in milliseconds since the epoch, for the session, must be greater than 0
 */
@Duration public void doSetLastActivityInstant(@Duration @Positive final long instant) {
  lastActivityInstant = Constraint.isGreaterThan(0, instant, "Last activity instant must be greater than 0");
}

代码示例来源:origin: net.shibboleth.idp/idp-session-impl

/**
 * Get the session inactivity timeout policy in milliseconds.
 * 
 * @return inactivity timeout
 */
@Duration @Positive public long getSessionTimeout() {
  return sessionTimeout;
}

代码示例来源:origin: org.opensaml/opensaml-saml-impl

/**
 * Sets the amount of time, in milliseconds, for which a message is valid.
 * 
 * @param lifetime amount of time, in milliseconds, for which a message is valid
 */
@Duration public synchronized void setMessageLifetime(@Duration @NonNegative final long lifetime) {
  ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
  
  messageLifetime = Constraint.isGreaterThanOrEqual(0, lifetime,
      "Message lifetime must be greater than or equal to 0");
}

代码示例来源:origin: net.shibboleth.idp/idp-saml-impl

/**
 * Set the SQL query timeout.
 * 
 * @param timeout the timeout to set in milliseconds
 */
@Duration public void setQueryTimeout(@Duration @NonNegative final long timeout) {
  ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
  
  queryTimeout = Constraint.isGreaterThanOrEqual(0, timeout, "Timeout must be greater than or equal to 0");
}

代码示例来源:origin: org.opensaml/opensaml-saml-impl

/**
 * Set the default assertion lifetime in milliseconds.
 * 
 * @param lifetime  default lifetime in milliseconds
 */
@Duration public void setDefaultAssertionLifetime(@Duration @NonNegative final long lifetime) {
  ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
  
  defaultAssertionLifetime = Constraint.isGreaterThanOrEqual(0, lifetime,
      "Default assertion lifetime must be greater than or equal to 0");
}

代码示例来源:origin: net.shibboleth.idp/idp-session-impl

/** {@inheritDoc} */
@Override 
@Nonnull protected SPSession doDeserialize(@Nonnull final JsonObject obj,
    @Nonnull @NotEmpty final String id, @Duration @Positive final long creation,
    @Duration @Positive final long expiration) throws IOException {
  
  return new BasicSPSession(id, creation, expiration);
}

代码示例来源:origin: net.shibboleth.idp/idp-saml-impl

/**
 * Constructor.
 * 
 * @param offset milliseconds to subtract from record expiration to establish session expiration value
 */
public SAML1SPSessionSerializer(@Duration @NonNegative @Nonnull @ParameterName(name="offset") final long offset) {
  super(offset);
}

代码示例来源:origin: net.shibboleth.idp/idp-profile-api

/**
 * Constructor.
 * 
 * @param skew the clock skew, must be greater than 0
 * @param generator the identifier generator, must not be null
 */
public SecurityConfiguration(@Duration @Positive final long skew,
    @Nonnull final IdentifierGenerationStrategy generator) {
  clockSkew = (int) Constraint.isGreaterThan(0, skew, "Clock skew must be greater than 0");
  idGenerator = Constraint.isNotNull(generator, "Identifier generator cannot be null");
}

代码示例来源:origin: net.shibboleth.idp/idp-session-impl

/**
 * Constructor.
 * 
 * @param lifetime lifetime in milliseconds, determines expiration of {@link SPSession} to be created
 */
public BasicSPSessionCreationStrategy(@Positive @Duration final long lifetime) {
  sessionLifetime = Constraint.isGreaterThan(0, lifetime, "Lifetime must be greater than 0");
  relyingPartyContextLookupStrategy = new ChildContextLookup<>(RelyingPartyContext.class);
}

代码示例来源:origin: net.shibboleth.idp/idp-saml-impl

/**
 * Constructor.
 * 
 * @param lifetime lifetime in milliseconds, determines upper bound for expiration of
 * {@link SAML2SPSession} to be created
 */
public SAML2SPSessionCreationStrategy(@Positive @Duration final long lifetime) {
  sessionLifetime = Constraint.isGreaterThan(0, lifetime, "Lifetime must be greater than 0");
  relyingPartyContextLookupStrategy = new ChildContextLookup<>(RelyingPartyContext.class);
  responseLookupStrategy =
      Functions.compose(new MessageLookup<>(Response.class), new OutboundMessageContextLookup());
}

相关文章

Duration类方法