import org.apache.http.auth.InvalidCredentialsException;
import org.biodas.jdas.client.ConnectionPropertyProviderI;
import org.biodas.jdas.client.SourcesClient;
+import org.biodas.jdas.client.threads.MultipleConnectionPropertyProviderI;
import org.biodas.jdas.dassources.Capabilities;
import org.biodas.jdas.schema.sources.CAPABILITY;
import org.biodas.jdas.schema.sources.SOURCE;
/**
*
*/
-public class DasSourceRegistry implements DasSourceRegistryI
+public class DasSourceRegistry implements DasSourceRegistryI,
+ MultipleConnectionPropertyProviderI
{
// private org.biodas.jdas.schema.sources.SOURCE[] dasSources = null;
private List<jalviewSourceI> dasSources = null;
}
@Override
- public Map<String, ConnectionPropertyProviderI> getSessionHandler()
+ public MultipleConnectionPropertyProviderI getSessionHandler()
{
+ return this;
+ }
+
+ @Override
+ public ConnectionPropertyProviderI getConnectionPropertyProviderFor(
+ String arg0)
+ {
+
final ConnectionPropertyProviderI conprov = new ConnectionPropertyProviderI()
{
boolean authed = false;
if (asuc != null && asuc.trim().length() > 0)
{
// authentication was successful
- Cache.log.debug("Authenticated successfully as " + asuc
- + " with " + connection.getURL().toString());
+ Cache.log.debug("Authenticated successfully to "
+ + connection.getURL().toString());
return false;
}
// it wasn't - so we should tell the user it failed and ask if they
}
}
};
- return new Map<String, ConnectionPropertyProviderI>()
- {
-
- @Override
- public void clear()
- {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public boolean containsKey(Object key)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public boolean containsValue(Object value)
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public Set<java.util.Map.Entry<String, ConnectionPropertyProviderI>> entrySet()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public ConnectionPropertyProviderI get(Object key)
- {
- return conprov;
- }
-
- @Override
- public boolean isEmpty()
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public Set<String> keySet()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public ConnectionPropertyProviderI put(String key,
- ConnectionPropertyProviderI value)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public void putAll(
- Map<? extends String, ? extends ConnectionPropertyProviderI> m)
- {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public ConnectionPropertyProviderI remove(Object key)
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public int size()
- {
- // TODO Auto-generated method stub
- return 0;
- }
-
- @Override
- public Collection<ConnectionPropertyProviderI> values()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
- };
+ return conprov;
}
}