public final class DelegationAbsoluteTime extends Object implements InvocationConstraint, Serializable
minStart
- delegation must not be permitted any earlier
than this time
maxStart
- delegation must be permitted from this time
onwards
minStop
- delegation must be permitted up until at least
this time
maxStop
- delegation must not be permitted after this time
The use of an instance of this class does not directly imply a
ClientAuthentication.YES
constraint or a Delegation.YES
constraint; those must be specified separately to ensure that the client
actually authenticates itself and that delegation is actually used.
Because this constraint is conditional on delegation, it does not conflict
with ClientAuthentication.NO
or Delegation.NO
.
ClientAuthentication
,
Delegation
,
DelegationRelativeTime
,
Serialized FormModifier and Type | Field and Description |
---|---|
private static SoftReference |
formatterRef
SoftReference containing a SimpleDateFormat instance, or null.
|
private long |
maxStart
The maximum start time in milliseconds from midnight, January 1, 1970
UTC.
|
private long |
maxStop
The maximum stop time in milliseconds from midnight, January 1, 1970
UTC.
|
private long |
minStart
The minimum start time in milliseconds from midnight, January 1, 1970
UTC.
|
private long |
minStop
The minimum stop time in milliseconds from midnight, January 1, 1970
UTC.
|
private static long |
serialVersionUID |
Constructor and Description |
---|
DelegationAbsoluteTime(Date minStart,
Date maxStart,
Date minStop,
Date maxStop)
Creates a constraint with the specified dates.
|
DelegationAbsoluteTime(long minStart,
long maxStart,
long minStop,
long maxStop)
Creates a constraint with the specified absolute times.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Two instances of this class are equal if both have the same minimum
start, the same maximum start, the same minimum stop, and the same
maximum stop.
|
private static void |
format(long min,
long max,
SimpleDateFormat formatter,
StringBuffer buf,
FieldPosition pos)
Format a min,max time pair.
|
private static SimpleDateFormat |
getFormatter()
Returns a formatter for "yyyy.MM.dd HH:mm:ss.SSSS zzz".
|
long |
getMaxStart()
Returns the maximum start time in milliseconds from midnight, January 1,
1970 UTC.
|
long |
getMaxStop()
Returns the maximum stop time in milliseconds from midnight, January 1,
1970 UTC.
|
long |
getMinStart()
Returns the minimum start time in milliseconds from midnight, January 1,
1970 UTC.
|
long |
getMinStop()
Returns the minimum stop time in milliseconds from midnight, January 1,
1970 UTC.
|
int |
hashCode()
Returns a hash code value for this object.
|
private void |
readObject(ObjectInputStream s)
Verifies that
minStart is less than or equal to
maxStart , maxStart is less than or equal to
minStop , and minStop is less than or equal to
maxStop . |
String |
toString()
Returns a string representation of this object.
|
private static final long serialVersionUID
private final long minStart
private final long maxStart
private final long minStop
private final long maxStop
private static SoftReference formatterRef
public DelegationAbsoluteTime(long minStart, long maxStart, long minStop, long maxStop)
minStart
- the minimum start time in milliseconds from midnight,
January 1, 1970 UTCmaxStart
- the maximum start time in milliseconds from midnight,
January 1, 1970 UTCminStop
- the minimum stop time in milliseconds from midnight,
January 1, 1970 UTCmaxStop
- the maximum stop time in milliseconds from midnight,
January 1, 1970 UTCIllegalArgumentException
- if minStart
is greater
than maxStart
, or maxStart
is greater than
minStop
, or minStop
is greater than
maxStop
public DelegationAbsoluteTime(Date minStart, Date maxStart, Date minStop, Date maxStop)
minStart
- the minimum start datemaxStart
- the maximum start dateminStop
- the minimum stop datemaxStop
- the maximum stop dateNullPointerException
- if any argument is null
IllegalArgumentException
- if minStart
is later
than maxStart
, or maxStart
is later than
minStop
, or minStop
is later than
maxStop
public long getMinStart()
public long getMaxStart()
public long getMinStop()
public long getMaxStop()
public int hashCode()
public boolean equals(Object obj)
public String toString()
private static void format(long min, long max, SimpleDateFormat formatter, StringBuffer buf, FieldPosition pos)
private static SimpleDateFormat getFormatter()
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
minStart
is less than or equal to
maxStart
, maxStart
is less than or equal to
minStop
, and minStop
is less than or equal to
maxStop
.InvalidObjectException
- if minStart
is greater
than maxStart
, or maxStart
is greater than
minStop
, or minStop
is greater than
maxStop
IOException
ClassNotFoundException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.