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

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

public class ArtifactPersistenceSvcMulticastEncodedNodeIdxImpl
extends java.lang.Object
implements ArtifactPersistenceService

A multicast backed implementation with good memory and network utilization. This implementation leverages multicast but does not share state with the entire cluster. Each node in the cluster negotiates a 'node index' with the rest of the cluster and when a node issues an assertion it encodes its node index into the message handle. When a node receives an artifact resolution request it decodes the node index in the message handle and makes a remote call to the server identified by that index to get the actual message associated with the artifact. State is replicated as needed 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
 
Constructor Summary
ArtifactPersistenceSvcMulticastEncodedNodeIdxImpl()
           
 
Method Summary
 java.lang.Integer getIndex()
           
 ArtifactPersistenceService.Message retrieve(byte[] handle)
           
 ArtifactPersistenceService.Message retrieveAndRemoveArtifact(byte[] messageHandle)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArtifactPersistenceSvcMulticastEncodedNodeIdxImpl

public ArtifactPersistenceSvcMulticastEncodedNodeIdxImpl()
                                                  throws org.jgroups.ChannelException,
                                                         org.jgroups.TimeoutException,
                                                         org.jgroups.SuspectedException
Throws:
org.jgroups.ChannelException
org.jgroups.TimeoutException
org.jgroups.SuspectedException
Method Detail

getIndex

public java.lang.Integer getIndex()

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.

retrieve

public ArtifactPersistenceService.Message retrieve(byte[] handle)

retrieveAndRemoveArtifact

public ArtifactPersistenceService.Message retrieveAndRemoveArtifact(byte[] messageHandle)
                                                             throws ArtifactPersistenceServiceException
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:
messageHandle - the 20 bytes that reference a specific protocol message.
Returns:
the Message object that is referred to by the messageHandle.
Throws:
ArtifactPersistenceServiceException - for any unexpected runtime problem that the implementation cannot handle.


Copyright 2007 Ping Identity Corp. All rights reserved.