Package org.opensaml.saml.common.binding.artifact

# Class ExpiringSAMLArtifactMapEntry

java.lang.Object
org.opensaml.saml.common.binding.artifact.BasicSAMLArtifactMapEntry
org.opensaml.saml.common.binding.artifact.ExpiringSAMLArtifactMapEntry

All Implemented Interfaces:
  `SAMLArtifactMap.SAMLArtifactMapEntry`

public class ExpiringSAMLArtifactMapEntry extends BasicSAMLArtifactMapEntry
Extension of `BasicSAMLArtifactMapEntry` that tracks expiration.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Instant`
`expiration`
Expiration time.

## Constructor Summary

Constructors
Constructor
Description
`ExpiringSAMLArtifactMapEntry(String samlArtifact, String issuerId, String relyingPartyId, SAMLObject samlMessage)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`Instant`
`getExpiration()`
Returns the expiration time.
`boolean`
`isValid()`
Returns true iff the entry is valid as of now.
`boolean`
`isValid(Instant effectiveTime)`
Returns true iff the entry is valid as of a specified time.
`void`
`setExpiration(Instant exp)`
Sets the expiration time.

### Methods inherited from class org.opensaml.saml.common.binding.artifact.BasicSAMLArtifactMapEntry

`getArtifact, getIssuerId, getRelyingPartyId, getSamlMessage`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### expiration

@Nullable private Instant expiration
Expiration time.

## Constructor Details

### ExpiringSAMLArtifactMapEntry

public ExpiringSAMLArtifactMapEntry(@Nonnull @NotEmpty String samlArtifact, @Nonnull @NotEmpty String issuerId, @Nonnull @NotEmpty String relyingPartyId, @Nonnull SAMLObject samlMessage) throws MarshallingException, UnmarshallingException
Constructor.

Parameters:
  `samlArtifact` - artifact associated with the message
  `issuerId` - issuer of the artifact
  `relyingPartyId` - intended recipient of the artifact
  `samlMessage` - SAML message mapped to the artifact
Throws:
  `MarshallingException` - if an error occurs isolating a message from its parent
  `UnmarshallingException` - if an error occurs isolating a message from its parent

## Method Details

### getExpiration

@Nullable public Instant getExpiration()
Returns the expiration time.

Returns:
  the expiration

### setExpiration

public void setExpiration(@Nullable Instant exp)
Sets the expiration time.

Parameters:
  `exp` - the expiration

### isValid

public boolean isValid()
Returns true iff the entry is valid as of now.

Returns:
  true iff the entry is valid as of now

### isValid

public boolean isValid(@Nonnull Instant effectiveTime)
Returns true iff the entry is valid as of a specified time.

Parameters:
  `effectiveTime` - the time to evaluate validity against
Returns:
  true iff the entry is valid as of a specified time