uPortal 2.4.1
API Documentation

org.jasig.portal.security
Class LocalConnectionContext

java.lang.Object
  extended byorg.jasig.portal.security.LocalConnectionContext

public abstract class LocalConnectionContext
extends java.lang.Object

LocalConnectionContext allows channels to tailor backend connections to reflect local policy and implementation. Connections are provided as Objects: they may be URL, LDAP, database connections, etc.

Channels using this need a way to determine which implementation to use. A standard way to do this is with a static data parameter 'upc_localConnContext', the value being the name of the implementing class. The default implementation handles the case where there are no local changes to standard behaviour.

Version:
$Revision: 1.4 $
Author:
Sarah Arnott, sarnott@mun.ca, Andrew Draskoy, andrew@mun.ca

Constructor Summary
LocalConnectionContext()
           
 
Method Summary
 java.lang.String getDescriptor(java.lang.String descriptor, ChannelRuntimeData rd)
          Returns a descriptor such as a URL for opening a connection to the backend application.
 void init(ChannelStaticData sd)
          Initialize LocalConnectionContext by setting static data.
 void sendLocalData(java.lang.Object connection, ChannelRuntimeData rd)
          Send any per-connection local data to the backend application.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalConnectionContext

public LocalConnectionContext()
Method Detail

init

public void init(ChannelStaticData sd)
Initialize LocalConnectionContext by setting static data. Parameters may be passed to the implementing class via static data (which includes access to IPerson). Must always be called before sendLocalData.

Parameters:
sd - The calling channel's ChannelStaticData.

getDescriptor

public java.lang.String getDescriptor(java.lang.String descriptor,
                                      ChannelRuntimeData rd)
Returns a descriptor such as a URL for opening a connection to the backend application. The descriptor should be modified as necessary, for example modifying the a URL to include new query string parameters.

Parameters:
descriptor - The original descriptor.
rd - The calling channel's ChannelRuntimeData.

sendLocalData

public void sendLocalData(java.lang.Object connection,
                          ChannelRuntimeData rd)
Send any per-connection local data to the backend application. E.g. headers in an http POST request. The default implementation does nothing.

Parameters:
connection - The connection Object to the backend application (ie. HttpURLConnection, DirContext).
rd - The calling channel's ChannelRuntimeData.

uPortal 2.4.1
API Documentation