当前位置: 首页>>代码示例>>Java>>正文


Java Duration类代码示例

本文整理汇总了Java中net.shibboleth.utilities.java.support.annotation.Duration的典型用法代码示例。如果您正苦于以下问题:Java Duration类的具体用法?Java Duration怎么用?Java Duration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Duration类属于net.shibboleth.utilities.java.support.annotation包,在下文中一共展示了Duration类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setDefaultRegistrationValidityPeriod

import net.shibboleth.utilities.java.support.annotation.Duration; //导入依赖的package包/类
/**
 * Set the default registration validity period in milliseconds.
 * 
 * @param lifetime The default validity period in milliseconds.
 */
@Duration public void setDefaultRegistrationValidityPeriod(@Duration @NonNegative final long lifetime) {
    ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
    
    defaultRegistrationValidityPeriod = Constraint.isGreaterThanOrEqual(0, lifetime,
            "Default registration validity period must be greater than or equal to 0");
}
 
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:12,代码来源:StoreClientInformation.java

示例2: setMinRefreshDelay

import net.shibboleth.utilities.java.support.annotation.Duration; //导入依赖的package包/类
/**
 * Sets the minimum amount of time, in milliseconds, between refreshes.
 * 
 * @param delay minimum amount of time, in milliseconds, between refreshes
 */
@Duration public void setMinRefreshDelay(@Duration @Positive final long delay) {
    ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
    ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);

    if (delay < 0) {
        throw new IllegalArgumentException("Minimum refresh delay must be greater than 0");
    }
    minRefreshDelay = delay;
}
 
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:15,代码来源:AbstractReloadingOIDCEntityResolver.java

示例3: setMaxRefreshDelay

import net.shibboleth.utilities.java.support.annotation.Duration; //导入依赖的package包/类
/**
 * Sets the maximum amount of time, in milliseconds, between refresh intervals.
 * 
 * @param delay maximum amount of time, in milliseconds, between refresh intervals
 */
@Duration public void setMaxRefreshDelay(@Duration @Positive final long delay) {
    ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
    ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
    
    if (delay < 0) {
        throw new IllegalArgumentException("Maximum refresh delay must be greater than 0");
    }
    maxRefreshDelay = delay;
}
 
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:15,代码来源:AbstractReloadingOIDCEntityResolver.java

示例4: setLifetime

import net.shibboleth.utilities.java.support.annotation.Duration; //导入依赖的package包/类
/**
 * Set time in milliseconds to expire consent storage records.
 * 
 * @param consentLifetime time in milliseconds to expire consent storage records
 */
public void setLifetime(@Nonnull @Duration @NonNegative final Long consentLifetime) {
    ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
    Constraint.isNotNull(consentLifetime, "Lifetime cannot be null");

    lifetime = Constraint.isGreaterThanOrEqual(0, consentLifetime, "Lifetime must be greater than or equal to 0");
}
 
开发者ID:cmu-cylab-privacylens,项目名称:PrivacyLens,代码行数:12,代码来源:ConsentFlowDescriptor.java

示例5: CASSPSession

import net.shibboleth.utilities.java.support.annotation.Duration; //导入依赖的package包/类
/**
 * Creates a new CAS SP session.
 *
 * @param id         the identifier of the service associated with this session
 * @param creation   creation time of session, in milliseconds since the epoch
 * @param expiration expiration time of session, in milliseconds since the epoch
 * @param ticketId   ticket ID used to gain access to the service
 */
public CASSPSession(
        @Nonnull @NotEmpty String id,
        @Duration @Positive long creation,
        @Duration @Positive long expiration,
        @Nonnull @NotEmpty String ticketId) {
    super(id, creation, expiration);
    this.ticketId = Constraint.isNotNull(StringSupport.trimOrNull(ticketId), "Ticket ID cannot be null or empty");
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:17,代码来源:CASSPSession.java

示例6: getRegistrationValidityPeriod

import net.shibboleth.utilities.java.support.annotation.Duration; //导入依赖的package包/类
/**
 * Get dynamic registration validity period.
 * 
 * @return Dynamic registration validity period in milliseconds.
 */
@Duration public long getRegistrationValidityPeriod() {
    return Constraint.isGreaterThan(-1,
            getIndirectProperty(registrationValidityPeriodLookupStrategy, registrationValidityPeriod),
            "Registration validity period must be 0 or positive.");
}
 
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:11,代码来源:OIDCDynamicRegistrationConfiguration.java

示例7: setRegistrationValidityPeriod

import net.shibboleth.utilities.java.support.annotation.Duration; //导入依赖的package包/类
/**
 * Sets the registration validity period.
 * 
 * @param millis Registration validity period in milliseconds.
 */
@Duration public void setRegistrationValidityPeriod(@Duration final long millis) {
    registrationValidityPeriod = Constraint.isGreaterThan(-1, millis, 
            "Registration validity period must be 0 or positive.");
}
 
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:10,代码来源:OIDCDynamicRegistrationConfiguration.java

示例8: UpdateIdPSessionWithSPSessionAction

import net.shibboleth.utilities.java.support.annotation.Duration; //导入依赖的package包/类
/**
 * Creates a new instance with given parameters.
 *
 * @param lifetime lifetime in milliseconds, determines upper bound for expiration of the
 * {@link CASSPSession} to be created
 */
public UpdateIdPSessionWithSPSessionAction(@Positive @Duration final long lifetime) {
    sessionLifetime = Constraint.isGreaterThan(0, lifetime, "Lifetime must be greater than 0");
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:10,代码来源:UpdateIdPSessionWithSPSessionAction.java

示例9: CASSPSessionSerializer

import net.shibboleth.utilities.java.support.annotation.Duration; //导入依赖的package包/类
/**
 * Constructor.
 *
 * @param offset milliseconds to subtract from record expiration to establish session expiration value
 */
public CASSPSessionSerializer(@Duration @NonNegative long offset) {
    super(offset);
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:9,代码来源:CASSPSessionSerializer.java

示例10: setTicketValidityPeriod

import net.shibboleth.utilities.java.support.annotation.Duration; //导入依赖的package包/类
/**
 * Sets the ticket validity period.
 *
 * @param millis Ticket validity period in milliseconds.
 */
public void setTicketValidityPeriod(@Duration @Positive final long millis) {
    this.ticketValidityPeriod = Constraint.isGreaterThan(0, millis, "Ticket validity period must be positive.");
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:9,代码来源:AbstractTicketConfiguration.java


注:本文中的net.shibboleth.utilities.java.support.annotation.Duration类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。