public class ElakConnectionBuilder extends Object implements ConnectionBuilder
ConnectionBuilder.| Modifier and Type | Field and Description |
|---|---|
static char |
PIPE_CHAR
The pipe character used to sepearte different protocol handlers.
|
static String |
PROTOCOL_HANDLER_PROPERTY_NAME
The system property name used to register a protocol handler.
|
static String |
WEBDAV_PROTOCOL_HANDLER
The package providing the ldap protocol handler.
|
| Constructor and Description |
|---|
ElakConnectionBuilder()
Constructor for ElakConnectionBuilder.
|
| Modifier and Type | Method and Description |
|---|---|
HttpURLConnection |
buildConnection(javax.servlet.http.HttpServletRequest req,
String publicURLPrefix,
String realURLPrefix,
SSLSocketFactory sslSocketFactory,
Vector parameters)
Builds an HttpURLConnection to a
URL which is derived
from an HttpServletRequest URL, by substitution of a
public URL prefix for the real URL prefix. |
void |
disconnect(HttpURLConnection conn)
Disconnects the HttpURLConnection if necessary.
|
public static final String PROTOCOL_HANDLER_PROPERTY_NAME
public static final String WEBDAV_PROTOCOL_HANDLER
public static final char PIPE_CHAR
public ElakConnectionBuilder()
throws ConfigurationException
ConfigurationException - on any config errorpublic HttpURLConnection buildConnection(javax.servlet.http.HttpServletRequest req, String publicURLPrefix, String realURLPrefix, SSLSocketFactory sslSocketFactory, Vector parameters) throws IOException
ConnectionBuilderURL which is derived
from an HttpServletRequest URL, by substitution of a
public URL prefix for the real URL prefix.URL.openConnection(), but
it has not yet been connected to by URLConnection.connect().allowUserInteraction = falsedoInput = truedoOutput = truerequestMethod = request.getMethod()useCaches = falsebuildConnection in interface ConnectionBuilderreq - the incoming request which shall be forwardedpublicURLPrefix - the public URL prefix to be substituted by the real URL prefixrealURLPrefix - the URL prefix to substitute the public URL prefixsslSocketFactory - factory to be used for creating an SSL socket in case
of a URL for scheme "https:";
null, the default SSL socket factory would be usedparameters - parameters to be forwardedURL.openConnection(), connecting to
the requested URL with publicURLPrefix substituted by realURLPrefixIOException - if an I/O exception occurs during opening the connectionConnectionBuilder.buildConnection(javax.servlet.http.HttpServletRequest, java.lang.String, java.lang.String, javax.net.ssl.SSLSocketFactory, java.util.Vector)public void disconnect(HttpURLConnection conn)
disconnect in interface ConnectionBuilderconn - the HttpURLConnection which is normaly to be closedCopyright © 2016. All Rights Reserved.