|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.constraint.DelegationAbsoluteTime
Represents a constraint on delegation, such that if delegation is permitted, it be permitted for a range of absolute times. Each end of the range is itself specified as a range, yielding four absolute times, all specified in milliseconds from midnight, January 1, 1970 UTC. The four times have the following semantics:
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 constraint 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.
Constructor Summary | |
DelegationAbsoluteTime(long minStart,
long maxStart,
long minStop,
long maxStop)
Creates a constraint with the specified absolute times. |
Method Summary | |
boolean |
equals(java.lang.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. |
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. |
SecurityConstraint |
reduceBy(SecurityConstraint c)
Returns the smallest representable subset of this constraint that contains the intersection of this constraint with the specified constraint, or null if there is no intersection. |
java.lang.String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
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 UTCjava.lang.IllegalArgumentException
- if minStart
is greater
than maxStart
, or maxStart
is greater than
minStop
, or minStop
is greater than
maxStop
Method Detail |
public long getMinStart()
public long getMaxStart()
public long getMinStop()
public long getMaxStop()
public SecurityConstraint reduceBy(SecurityConstraint c)
null
if there is no intersection.
For any instances c1
and c2
of this class,
c1.reduceBy(c2)
returns a
DelegationAbsoluteTime
instance with a minimum start time
of
Math.max(c1.getMinStart(), c2.getMinStart())a maximum start time of
Math.min(c1.getMaxStart(), c2.getMaxStart())a minimum stop time of
Math.max(c1.getMinStop(), c2.getMinStop())and a maximum stop time of
Math.min(c1.getMaxStop(), c2.getMaxStop())unless the computed minimum start is greater than the computed maximum start, or the computed maximum start is greater than the computed minimum stop, or the computed minimum stop is greater than the computed maximum stop, in which cases the result is
null
.
For any instance c
of this class,
c.reduceBy(Delegation.NO)
returns
Delegation.NO
and
c.reduceBy(ClientAuthentication.NO)
returns
ClientAuthentication.NO
.
For any instance c1
of this class and any
ConstraintAlternatives
instance c2
containing DelegationAbsoluteTime
instances,
c1.reduceBy(c2)
returns the result of calling
ConstraintAlternatives.create
with all of the
non-null
values returned by c1.reduceBy(c)
for each element c
of c2
, or null
if there are no non-null
values.
For any instance c1
of this class and any other constraint
instance c2
not previously mentioned,
c1.reduceBy(c2)
returns c1
.
reduceBy
in interface SecurityConstraint
java.rmi.constraint.SecurityConstraint
c
- a constraintnull
if
there is no intersectionpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |