public class BasicSAMLArtifactMap extends AbstractInitializableComponent implements SAMLArtifactMap
Modifier and Type | Class and Description |
---|---|
protected class |
BasicSAMLArtifactMap.Cleanup
A cleanup task that relies on the weakly consistent iterator support in the map implementation.
|
SAMLArtifactMap.SAMLArtifactMapEntry, SAMLArtifactMap.SAMLArtifactMapEntryFactory
Constructor and Description |
---|
BasicSAMLArtifactMap()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String artifact)
Checks if a given artifact has a map entry.
|
protected void |
doDestroy()
Performs component specific destruction logic.
|
protected void |
doInitialize()
Performs the initialization of the component.
|
SAMLArtifactMap.SAMLArtifactMapEntry |
get(String artifact)
Gets the artifact entry for the given artifact.
|
long |
getArtifactLifetime()
Get the artifact entry lifetime in milliseconds.
|
SAMLArtifactMap.SAMLArtifactMapEntryFactory |
getEntryFactory()
Get the map entry factory.
|
void |
put(String artifact,
String relyingPartyId,
String issuerId,
SAMLObject samlMessage)
Creates a mapping between a given artifact and the SAML message to which it maps.
|
void |
remove(String artifact)
Removes the artifact from this map.
|
void |
setArtifactLifetime(long lifetime)
Set the artifact entry lifetime in milliseconds.
|
void |
setCleanupInterval(long interval)
Set the cleanup interval in milliseconds, or 0 for none.
|
void |
setEntryFactory(SAMLArtifactMap.SAMLArtifactMapEntryFactory factory)
Set the map entry factory.
|
destroy, initialize, isDestroyed, isInitialized
protected void doInitialize() throws ComponentInitializationException
doInitialize
in class AbstractInitializableComponent
ComponentInitializationException
- thrown if there is a problem initializing the componentprotected void doDestroy()
doDestroy
in class AbstractInitializableComponent
@Positive public long getArtifactLifetime()
@Nonnull public SAMLArtifactMap.SAMLArtifactMapEntryFactory getEntryFactory()
public void setArtifactLifetime(@Duration @Positive long lifetime)
lifetime
- artifact entry lifetime in millisecondspublic void setCleanupInterval(@Duration @NonNegative long interval)
interval
- cleanup interval in millisecondspublic void setEntryFactory(@Nonnull SAMLArtifactMap.SAMLArtifactMapEntryFactory factory)
factory
- map entry factorypublic boolean contains(@Nonnull @NotEmpty String artifact) throws IOException
contains
in interface SAMLArtifactMap
artifact
- the artifact to checkIOException
- if an error occurs retrieving the information@Nullable public SAMLArtifactMap.SAMLArtifactMapEntry get(@Nonnull @NotEmpty String artifact) throws IOException
get
in interface SAMLArtifactMap
artifact
- the artifact to retrieve the entry forIOException
- if an error occurs retrieving the informationpublic void put(@Nonnull @NotEmpty String artifact, @Nonnull @NotEmpty String relyingPartyId, @Nonnull @NotEmpty String issuerId, @Nonnull SAMLObject samlMessage) throws IOException
put
in interface SAMLArtifactMap
artifact
- the artifactrelyingPartyId
- ID of the party the artifact was sent toissuerId
- ID of the issuer of the artifactsamlMessage
- the SAML messageIOException
- if an error occurs storing the informationpublic void remove(@Nonnull @NotEmpty String artifact) throws IOException
remove
in interface SAMLArtifactMap
artifact
- artifact to be removedIOException
- if an error occurs retrieving the informationCopyright © 2016 JBoss by Red Hat. All rights reserved.