info.sswap.ontologies.data.impl
Class HTTPBasicAuthenticationAccessor
java.lang.Object
info.sswap.ontologies.data.impl.HTTPBasicAuthenticationAccessor
- All Implemented Interfaces:
- Accessor
public class HTTPBasicAuthenticationAccessor
- extends java.lang.Object
- implements Accessor
Implementation of a HTTP Basic Authentication Accessor
- Author:
- Damian Gessler
Method Summary |
java.net.URLConnection |
access(java.net.URLConnection urlConnection)
Method acts as a filter: it is passed a URLConnection and should
return an authenticated URLConnection suitable for immediate reading. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
uri
public static final java.net.URI uri
- A URN for designating HTTP Basic Authentication
encodedUsernameAndPassword
private java.lang.String encodedUsernameAndPassword
HTTPBasicAuthenticationAccessor
public HTTPBasicAuthenticationAccessor(java.lang.String username,
java.lang.String passwd)
throws DataAccessException
- HTTP Basic Authentication Accessor
- Parameters:
username
- the username (login) to authenticatepasswd
- the password for the username
- Throws:
DataAccessException
- on any error in establishing access
access
public java.net.URLConnection access(java.net.URLConnection urlConnection)
throws java.io.IOException,
AccessorException
- Description copied from interface:
Accessor
- Method acts as a filter: it is passed a URLConnection and should
return an authenticated URLConnection suitable for immediate reading.
- Specified by:
access
in interface Accessor
- Parameters:
urlConnection
- URL connection to be opened (authenticated, authorized, etc.)
- Returns:
- an authenticated, authorized, etc. URL connection ready for reading
- Throws:
java.io.IOException
- on any connection error
AccessorException
- on any Accessor-specific error
Copyright (c) 2011, iPlant Collaborative, University of Arizona, Cold Spring Harbor Laboratories, University of Texas at Austin.