org.sourceid.saml20.service.impl.proxy
Class SpSessionRegistryProxy

java.lang.Object
  extended by org.sourceid.saml20.service.impl.proxy.SpSessionRegistryProxy
All Implemented Interfaces:
SpSessionRegistry

public class SpSessionRegistryProxy
extends java.lang.Object
implements SpSessionRegistry

Chooses between an in-memory implementation or a multicast implementation at runtime depending on the configuration of the PingFederate server.

Author:
Brian Campbell

Constructor Summary
SpSessionRegistryProxy()
           
 
Method Summary
 SpHashableAuthnBean lookupAuthnBean(Session s)
          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.
 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

SpSessionRegistryProxy

public SpSessionRegistryProxy()
                       throws java.lang.IllegalAccessException,
                              java.lang.InstantiationException
Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException
Method Detail

registerSessionReceived

public void registerSessionReceived(SpHashableAuthnBean authnBean,
                                    Session session)
                             throws SessionRegistryException
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.
Throws:
SessionRegistryException - for any unexpected runtime problem that the implementation cannot handle.

lookupSessions

public java.util.List<Session> lookupSessions(java.lang.String partnerEntityId,
                                              org.sourceid.saml20.xmlbinding.assertion.NameIDType nameIDType)
                                       throws SessionRegistryException
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.
Throws:
SessionRegistryException - for any unexpected runtime problem that the implementation cannot handle.

lookupAuthnBean

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

Specified by:
lookupAuthnBean in interface SpSessionRegistry
Parameters:
s - the session.
Returns:
the SpHashableAuthnBean that was registered with the given session.
Throws:
SessionRegistryException - for any unexpected runtime problem that the implementation cannot handle.

lookupSessionReceived

public Session lookupSessionReceived(SpHashableAuthnBean authnBean)
                              throws SessionRegistryException
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.
Throws:
SessionRegistryException - for any unexpected runtime problem that the implementation cannot handle.

unregisterSessionReceived

public Session unregisterSessionReceived(SpHashableAuthnBean authnBean)
                                  throws SessionRegistryException
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.
Throws:
SessionRegistryException - for any unexpected runtime problem that the implementation cannot handle.

lookupAuthnBeans

public java.util.List<SpHashableAuthnBean> lookupAuthnBeans(java.lang.String sessionIdentifier)
                                                     throws SessionRegistryException
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
Throws:
SessionRegistryException - for any unexpected runtime problem that the implementation cannot handle.


Copyright 2007 Ping Identity Corp. All rights reserved.