public class StrongConnectionBuilder extends StrongBuilderBase<StrongConnectionBuilder,java.net.HttpURLConnection>
StrongBuilder.Callback<C>context, proxyType, sslContext, TOR_CHECK_URL, useWeakCiphers, validateTor| Constructor and Description |
|---|
StrongConnectionBuilder(android.content.Context context)
Creates a builder instance.
|
StrongConnectionBuilder(StrongConnectionBuilder original)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.net.HttpURLConnection |
build(android.content.Intent status)
Builds a connection, applying the configuration already
specified in the builder.
|
StrongConnectionBuilder |
connectTo(java.lang.String url)
Sets the URL to build a connection for.
|
StrongConnectionBuilder |
connectTo(java.net.URL url)
Sets the URL to build a connection for.
|
static StrongConnectionBuilder |
forMaxSecurity(android.content.Context context)
Creates a StrongConnectionBuilder using the strongest set
of options for security.
|
protected java.lang.String |
get(android.content.Intent status,
java.net.HttpURLConnection connection,
java.lang.String url)
Performs an HTTP GET request using the supplied connection
to a supplied URL, returning the String response or
throws an Exception (e.g., cannot reach the server).
|
static java.lang.String |
slurp(java.io.InputStream is) |
build, buildProxy, buildSocketFactory, checkTor, getHttpPort, getSocksPort, getSSLContext, supportsHttpProxy, supportsSocksProxy, withBestProxy, withHttpProxy, withSocksProxy, withTorValidation, withTrustManagers, withWeakCipherspublic StrongConnectionBuilder(android.content.Context context)
context - any Context will do; builder will hold onto
Application contextpublic StrongConnectionBuilder(StrongConnectionBuilder original)
original - builder to clonepublic static StrongConnectionBuilder forMaxSecurity(android.content.Context context) throws java.lang.Exception
context - any Context will dojava.lang.Exceptionpublic StrongConnectionBuilder connectTo(java.lang.String url) throws java.net.MalformedURLException
url - the URLjava.net.MalformedURLExceptionpublic StrongConnectionBuilder connectTo(java.net.URL url)
url - the URLpublic java.net.HttpURLConnection build(android.content.Intent status)
throws java.io.IOException
status - status Intent from OrbotInitializerjava.io.IOExceptionprotected java.lang.String get(android.content.Intent status,
java.net.HttpURLConnection connection,
java.lang.String url)
throws java.lang.Exception
StrongBuilderBaseget in class StrongBuilderBase<StrongConnectionBuilder,java.net.HttpURLConnection>status - the status Intent we got back from Orbotconnection - a connection of the type for the builderurl - an public Web pagejava.lang.Exceptionpublic static java.lang.String slurp(java.io.InputStream is)
throws java.io.IOException
java.io.IOException