org.sourceid.saml20.service.impl.multicast
Class ArtifactPersistenceSvcMulticastImpl

java.lang.Object
  extended by org.sourceid.saml20.service.impl.multicast.ArtifactPersistenceSvcMulticastImpl
All Implemented Interfaces:
ArtifactPersistenceService

public class ArtifactPersistenceSvcMulticastImpl
extends java.lang.Object
implements ArtifactPersistenceService

A multicast backed implementation of this service interface that allows state to be shared between nodes in a cluster. State is replicated within a full cluster.

Author:
Brian Campbell

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.sourceid.saml20.service.ArtifactPersistenceService
ArtifactPersistenceService.Handle, ArtifactPersistenceService.Message
 
Field Summary
protected  com.pingidentity.multicast.map.DistributedMap distributedMap
           
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
ArtifactPersistenceSvcMulticastImpl()
           
 
Method Summary
 ArtifactPersistenceService.Message retrieveAndRemoveArtifact(byte[] msghandle)
          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.
protected  boolean shouldDoRemove(java.util.Map.Entry entry, long now)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log

distributedMap

protected com.pingidentity.multicast.map.DistributedMap distributedMap
Constructor Detail

ArtifactPersistenceSvcMulticastImpl

public ArtifactPersistenceSvcMulticastImpl()
Method Detail

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[] msghandle)
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:
msghandle - the 20 bytes that reference a specific protocol message.
Returns:
the Message object that is referred to by the messageHandle.

shouldDoRemove

protected boolean shouldDoRemove(java.util.Map.Entry entry,
                                 long now)


Copyright 2007 Ping Identity Corp. All rights reserved.