|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.vt.middleware.ldap.ssl.AbstractCredentialReader<T>
T - Type of credential read by this instance.public abstract class AbstractCredentialReader<T>
Base class for all credential readers. It provides support for loading files from resources on the classpath or a filepath. If a path is prefixed with the string "classpath:" it is interpreted as a classpath specification. If a path is prefixed with the string "file:" it is interpreted as a file path. Any other input throws IllegalArgumentException.
| Field Summary | |
|---|---|
static String |
CLASSPATH_PREFIX
Prefix used to indicate a classpath resource. |
static String |
FILE_PREFIX
Prefix used to indicate a file resource. |
protected org.apache.commons.logging.Log |
logger
Log for this class. |
| Constructor Summary | |
|---|---|
AbstractCredentialReader()
|
|
| Method Summary | |
|---|---|
protected InputStream |
getBufferedInputStream(InputStream is)
Gets a buffered input stream from the given input stream. |
abstract T |
read(InputStream is,
String... params)
Reads a credential object from an input stream. |
T |
read(String path,
String... params)
Reads a credential object from a path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CLASSPATH_PREFIX
public static final String FILE_PREFIX
protected final org.apache.commons.logging.Log logger
| Constructor Detail |
|---|
public AbstractCredentialReader()
| Method Detail |
|---|
public T read(String path,
String... params)
throws IOException,
GeneralSecurityException
read in interface CredentialReader<T>path - Path from which to read credential.params - Arbitrary string parameters, e.g. password, needed to read
the credential.
IOException - On IO errors.
GeneralSecurityException - On errors with the credential data.
public abstract T read(InputStream is,
String... params)
throws IOException,
GeneralSecurityException
read in interface CredentialReader<T>is - Input stream from which to read credential.params - Arbitrary string parameters, e.g. password, needed to read
the credential.
IOException - On IO errors.
GeneralSecurityException - On errors with the credential data.protected InputStream getBufferedInputStream(InputStream is)
is - Input stream from which to create buffered instance.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||