org.sourceid.saml20.service.impl.localmemory
Class ArtifactPersistenceServiceMapImpl

java.lang.Object
  extended by org.sourceid.saml20.service.impl.localmemory.ArtifactPersistenceServiceMapImpl
All Implemented Interfaces:
java.io.Serializable, ArtifactPersistenceService

public class ArtifactPersistenceServiceMapImpl
extends java.lang.Object
implements ArtifactPersistenceService, java.io.Serializable

A HashMap backed implementation of the ArtifactPersistenceService.

Author:
Brian Campbell
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.sourceid.saml20.service.ArtifactPersistenceService
ArtifactPersistenceService.Handle, ArtifactPersistenceService.Message
 
Constructor Summary
ArtifactPersistenceServiceMapImpl()
           
ArtifactPersistenceServiceMapImpl(int bufferTimeMillis)
           
 
Method Summary
protected  void cleanupExpiredEntries(long nowTimestamp)
           
protected  int getArtifactMapSize()
           
protected  int getSortedMapSize()
           
protected  int getTotalNumItemsInSortedMap()
           
 ArtifactPersistenceService.Message retrieveAndRemoveArtifact(byte[] messageHandlebytes)
          Retrieves (and removes from the underlying storage mechanism) the protocol message associated to the given message handle.
 ArtifactPersistenceService.Handle saveArtifact(ArtifactPersistenceService.Message msg, int timeoutSeconds)
          Saves a protocol message associated to a byte array message handle for retrieval later (usually a very short time later) via artifact.
 void saveArtifact(byte[] messageHandleBytes, ArtifactPersistenceService.Message msg, int timeoutSeconds)
           
 void setMetadataLocal(org.sourceid.saml20.metadata.local.MetadataLocal metadataLocal)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArtifactPersistenceServiceMapImpl

public ArtifactPersistenceServiceMapImpl()

ArtifactPersistenceServiceMapImpl

public ArtifactPersistenceServiceMapImpl(int bufferTimeMillis)
Method Detail

saveArtifact

public void saveArtifact(byte[] messageHandleBytes,
                         ArtifactPersistenceService.Message msg,
                         int timeoutSeconds)

saveArtifact

public ArtifactPersistenceService.Handle saveArtifact(ArtifactPersistenceService.Message msg,
                                                      int timeoutSeconds)
Description copied from interface: ArtifactPersistenceService
Saves a protocol message associated to a byte array message handle for retrieval later (usually a very short time later) via artifact.

Specified by:
saveArtifact in interface ArtifactPersistenceService
Parameters:
msg - the protocol xml message.
timeoutSeconds - the number of seconds after which the message/artifact are no longer valid.
Returns:
a Handle object that contains the message handle byte array as well as the endpoint index. This object will be used to create the full artifact string value.

retrieveAndRemoveArtifact

public ArtifactPersistenceService.Message retrieveAndRemoveArtifact(byte[] messageHandlebytes)
Description copied from interface: ArtifactPersistenceService
Retrieves (and removes from the underlying storage mechanism) the protocol message associated to the given message handle.

Specified by:
retrieveAndRemoveArtifact in interface ArtifactPersistenceService
Parameters:
messageHandlebytes - the 20 bytes that reference a specific protocol message.
Returns:
the Message object that is referred to by the messageHandle.

cleanupExpiredEntries

protected void cleanupExpiredEntries(long nowTimestamp)

getArtifactMapSize

protected int getArtifactMapSize()

getSortedMapSize

protected int getSortedMapSize()

getTotalNumItemsInSortedMap

protected int getTotalNumItemsInSortedMap()

setMetadataLocal

public void setMetadataLocal(org.sourceid.saml20.metadata.local.MetadataLocal metadataLocal)


Copyright 2007 Ping Identity Corp. All rights reserved.