org.apache.xml.security.utils.resolver.implementations
Class ResolverDirectHTTP
java.lang.Object
org.apache.xml.security.utils.resolver.ResourceResolverSpi
org.apache.xml.security.utils.resolver.implementations.ResolverDirectHTTP
- public class ResolverDirectHTTP
- extends ResourceResolverSpi
A simple ResourceResolver for HTTP requests. This class handles only 'pure'
HTTP URIs which means without a fragment. The Fragment handling is done by the
ResolverFragment
class.
If the user has a corporate HTTP proxy which is to be used, the usage can be
switched on by setting properties for the resolver:
resourceResolver.setProperty("http.proxy.host", "proxy.company.com");
resourceResolver.setProperty("http.proxy.port", "8080");
// if we need a password for the proxy
resourceResolver.setProperty("http.proxy.username", "proxyuser3");
resourceResolver.setProperty("http.proxy.password", "secretca");
- Author:
- $Author: coheigea $
- See Also:
- Java Tip 42: Write Java apps that work with proxy-based firewalls,
SUN J2SE docs for network properties,
The JAVA FAQ Question 9.5: How do I make Java work with a proxy server?
$todo$ the proxy behaviour seems not to work; if a on-existing proxy is set, it works ?!?
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResolverDirectHTTP
public ResolverDirectHTTP()
engineIsThreadSafe
public boolean engineIsThreadSafe()
- Description copied from class:
ResourceResolverSpi
- Tells if the implementation does can be reused by several threads safely.
It normally means that the implemantation does not have any member, or there is
member change betwen engineCanResolve & engineResolve invocations. Or it mantians all
member info in ThreadLocal methods.
- Overrides:
engineIsThreadSafe
in class ResourceResolverSpi
engineResolve
public XMLSignatureInput engineResolve(org.w3c.dom.Attr uri,
java.lang.String BaseURI)
throws ResourceResolverException
- Method resolve
- Specified by:
engineResolve
in class ResourceResolverSpi
- Parameters:
uri
- BaseURI
-
- Returns:
- $todo$ calculate the correct URI from the attribute and the BaseURI
- Throws:
ResourceResolverException
engineCanResolve
public boolean engineCanResolve(org.w3c.dom.Attr uri,
java.lang.String BaseURI)
- We resolve http URIs without fragment...
- Specified by:
engineCanResolve
in class ResourceResolverSpi
- Parameters:
uri
- BaseURI
-
- Returns:
- true if can be resolved
engineGetPropertyKeys
public java.lang.String[] engineGetPropertyKeys()
- Description copied from class:
ResourceResolverSpi
- Method engineGetPropertyKeys
- Overrides:
engineGetPropertyKeys
in class ResourceResolverSpi
- Returns:
- the property keys