Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.security
Class LocalConnectionContext

    java.lang.Object
      org.jasig.portal.security.LocalConnectionContext

Direct Known Subclasses:
  BasicLocalConnectionContext, CasConnectionContext

    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.5.4.1 $
Author:
  Sarah Arnott, sarnott@mun.ca, Andrew Draskoy, andrew@mun.ca

Field Summary
`protected org.apache.commons.logging.Log` | `log`
`protected ChannelStaticData` | `staticData`

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
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### staticData

    protected ChannelStaticData staticData

### log

    protected final org.apache.commons.logging.Log log

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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD