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

java.lang.Object
  extended by org.sourceid.saml20.service.impl.localmemory.SpSessionRegistryMapImpl
All Implemented Interfaces:
java.io.Serializable, SpSessionRegistry, org.sourceid.saml20.state.StateAccepter

public class SpSessionRegistryMapImpl
extends java.lang.Object
implements SpSessionRegistry, org.sourceid.saml20.state.StateAccepter, java.io.Serializable

A HashMap backed implementation of the SpSessionRegistry.

Author:
Brian Campbell
See Also:
Serialized Form

Constructor Summary
SpSessionRegistryMapImpl()
           
 
Method Summary
 SpHashableAuthnBean lookupAuthnBean(Session assertion)
          Retrieve the SpHashableAuthnBean that was registered with the given session.
 java.util.List<SpHashableAuthnBean> lookupAuthnBeans(java.lang.String sessionIdentifier)
          Retrieve all the SpHashableAuthnBean associated with the PingFederate session id.
 Session lookupSessionReceived(SpHashableAuthnBean authnBean)
          Retrieve the session that was registered with the given SpHashableAuthnBean.
 java.util.List<Session> lookupSessions(java.lang.String partnerEntityId, org.sourceid.saml20.xmlbinding.assertion.NameIDType nameIDType)
          Retrieve a list of sessions that have the given parameters.
 void registerSessionReceived(SpHashableAuthnBean authnBean, Session session)
          Register a session received from an IdP with the SpHashableAuthnBean that represents the application session created by the adapter.
 void setState(SpSessionRegistryMapImpl other)
           
 void setState(org.sourceid.saml20.state.StateAccepter other)
           
 Session unregisterSessionReceived(SpHashableAuthnBean authnBean)
          Same as lookupSessionReceived but the session is also removed from the registry (usually because of logout).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpSessionRegistryMapImpl

public SpSessionRegistryMapImpl()
Method Detail

setState

public void setState(org.sourceid.saml20.state.StateAccepter other)
Specified by:
setState in interface org.sourceid.saml20.state.StateAccepter

setState

public void setState(SpSessionRegistryMapImpl other)

registerSessionReceived

public void registerSessionReceived(SpHashableAuthnBean authnBean,
                                    Session session)
Description copied from interface: SpSessionRegistry
Register a session received from an IdP with the SpHashableAuthnBean that represents the application session created by the adapter.

Specified by:
registerSessionReceived in interface SpSessionRegistry
Parameters:
authnBean - the local application session information.
session - info from the assertion that was used to establish the local security context.

lookupSessions

public java.util.List<Session> lookupSessions(java.lang.String partnerEntityId,
                                              org.sourceid.saml20.xmlbinding.assertion.NameIDType nameIDType)
Description copied from interface: SpSessionRegistry
Retrieve a list of sessions that have the given parameters.

Specified by:
lookupSessions in interface SpSessionRegistry
Parameters:
partnerEntityId - the entity id of the IdP that issued the session(s)/assertion(s).
nameIDType - the xml name id chunk from the assertion(s)/sessions(s)
Returns:
a list of Sessions that match the given criteria.

lookupAuthnBean

public SpHashableAuthnBean lookupAuthnBean(Session assertion)
Description copied from interface: SpSessionRegistry
Retrieve the SpHashableAuthnBean that was registered with the given session.

Specified by:
lookupAuthnBean in interface SpSessionRegistry
Parameters:
assertion - the session.
Returns:
the SpHashableAuthnBean that was registered with the given session.

lookupAuthnBeans

public java.util.List<SpHashableAuthnBean> lookupAuthnBeans(java.lang.String sessionIdentifier)
Description copied from interface: SpSessionRegistry
Retrieve all the SpHashableAuthnBean associated with the PingFederate session id.

Specified by:
lookupAuthnBeans in interface SpSessionRegistry
Parameters:
sessionIdentifier - PingFederate's HTTP session id.
Returns:
a list of SpHashableAuthnBeans

lookupSessionReceived

public Session lookupSessionReceived(SpHashableAuthnBean authnBean)
Description copied from interface: SpSessionRegistry
Retrieve the session that was registered with the given SpHashableAuthnBean.

Specified by:
lookupSessionReceived in interface SpSessionRegistry
Parameters:
authnBean - the SpHashableAuthnBean.
Returns:
the Session.

unregisterSessionReceived

public Session unregisterSessionReceived(SpHashableAuthnBean authnBean)
Description copied from interface: SpSessionRegistry
Same as lookupSessionReceived but the session is also removed from the registry (usually because of logout).

Specified by:
unregisterSessionReceived in interface SpSessionRegistry
Parameters:
authnBean - the SpHashableAuthnBean.
Returns:
the Session.


Copyright 2007 Ping Identity Corp. All rights reserved.