org.safehaus.triplesec.guardian
Interface ConnectionDriver

All Known Implementing Classes:
LdapConnectionDriver, LdifConnectionDriver

public interface ConnectionDriver

A driver interface that provides an extension mechanism for TripleSec Guardian API to support various connection types such as JNDI, in-memory store, and JDBC.

Version:
$Rev: 53 $
Author:
Trustin Lee, Alex Karasulu

Method Summary
 boolean accept(java.lang.String url)
          Implement this method to return true if and only if this driver can connect to the specified url
 ApplicationPolicy newStore(java.lang.String url, java.util.Properties info)
          Implement this method to connect to the ApplicationPolicy with the specified url and return the connected ApplicationPolicy.
 

Method Detail

accept

boolean accept(java.lang.String url)
Implement this method to return true if and only if this driver can connect to the specified url

Parameters:
url - the URL to connect to
Returns:
true if and only if this driver can connect to the specified url

newStore

ApplicationPolicy newStore(java.lang.String url,
                           java.util.Properties info)
                           throws GuardianException
Implement this method to connect to the ApplicationPolicy with the specified url and return the connected ApplicationPolicy.

Parameters:
url - the URL to connect to
info - the extra information a user specified
Returns:
the connected ApplicationPolicy
Throws:
GuardianException - if failed to connect