public class KerberosTime
extends org.apache.kerby.asn1.type.Asn1GeneralizedTime
| Modifier and Type | Field and Description |
|---|---|
static int |
DAY
The number of milliseconds in a day.
|
static int |
MINUTE
The number of milliseconds in a minute.
|
static KerberosTime |
NEVER
Constant for the
KerberosTime "infinity." |
static int |
WEEK
The number of milliseconds in a week.
|
| Constructor and Description |
|---|
KerberosTime()
Creates a new instance of a KerberosTime object with the current time
|
KerberosTime(long time) |
| Modifier and Type | Method and Description |
|---|---|
KerberosTime |
copy() |
long |
diff(KerberosTime kerberosTime)
Return the difference between the currentKerberosTime and the provided one
|
boolean |
equals(Object that) |
KerberosTime |
extend(long duration)
Create a KerberosTime based on a time in milliseconds.
|
long |
getTime() |
long |
getTimeInSeconds()
Gets the time in seconds
|
boolean |
greaterThan(KerberosTime ktime)
Compare the KerberosTime with another one, and return true
if it's greater than the provided one
|
boolean |
greaterThanWithSkew(KerberosTime ktime,
long skew)
Compare the KerberosTime with another one, and return true
if it's greater than the provided one with time skew
|
int |
hashCode() |
boolean |
isInClockSkew(long clockSkew)
Check if the KerberosTime is within the provided clock skew
|
boolean |
lessThan(KerberosTime ktime)
Compare the KerberosTime with another one, and return true
if it's lesser than the provided one
|
boolean |
lessThan(long time)
Compare the KerberosTime with a time, and return true
if it's lesser than the provided one
|
boolean |
lessThanWithSkew(KerberosTime ktime,
long skew)
Compare the KerberosTime with another one, and return true
if it's lesser than the provided one with time skew
|
static KerberosTime |
now() |
void |
setTime(long time)
Set the Kerberos time
|
createSimple, createSimple, decodeBody, encodeBody, encodeBody, encodingBodyLength, getBytes, isDefinitiveLength, isSimple, isSimple, isSimple, setBytes, toStringdecode, decode, decode, encode, encode, encodingHeaderLength, encodingLength, getBodyLength, getHeaderLength, isBER, isCER, isDER, isImplicit, isPrimitive, resetBodyLength, taggedDecode, taggedDecode, taggedDecode, taggedEncode, taggedEncode, taggedEncodingLength, useBER, useCER, useDefinitiveLength, useDER, useImplicit, usePrimitiveisAppSpecific, isCollection, isContextSpecific, isEOC, isNull, isSimple, isTagSpecific, isUniversal, simpleInfo, tag, tagFlags, tagNopublic static final KerberosTime NEVER
KerberosTime "infinity."public static final int MINUTE
public static final int DAY
public static final int WEEK
public KerberosTime()
public KerberosTime(long time)
time - in millisecondspublic long getTime()
public void setTime(long time)
time - set time in millisecondspublic long getTimeInSeconds()
public boolean lessThan(KerberosTime ktime)
ktime - in millisecondspublic boolean lessThan(long time)
time - in millisecondspublic boolean lessThanWithSkew(KerberosTime ktime, long skew)
ktime - skew - Maximum time skew in millisecondspublic boolean greaterThan(KerberosTime ktime)
ktime - compare with millisecondspublic boolean greaterThanWithSkew(KerberosTime ktime, long skew)
ktime - skew - Maximum time skew in millisecondspublic boolean isInClockSkew(long clockSkew)
clockSkew - The clock skewpublic KerberosTime copy()
public KerberosTime extend(long duration)
duration - The durationpublic long diff(KerberosTime kerberosTime)
kerberosTime - The kerberos timepublic static KerberosTime now()
public int hashCode()
hashCode in class ObjectObject.hashCode()Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.