public enum ScrapingHttpClientType extends java.lang.Enum<ScrapingHttpClientType>
Enum Constant and Description |
---|
ApacheHttpClient4
Apache Http Client 4
|
AsyncHttpClient2
Async Http Client version 2
|
CurlHttpClient
Async Http Client version 2
|
NingAsyncHttpClient
Ning Async Http Client
|
Modifier and Type | Method and Description |
---|---|
static ScrapingHttpClientType |
fromString(java.lang.String text)
Converts a string to the actual object
|
static ScrapingHttpClientType |
getDefaultClientType()
Returns the default client type to use for scraping
|
java.lang.String |
getDisplayName()
Returns the DisplayName for the object
|
abstract ScrapingHttpClient |
prepareNewClient(ScrapingSession session)
Prepares the new scraping client, using the given session.
|
java.lang.String |
toString() |
static ScrapingHttpClientType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ScrapingHttpClientType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ScrapingHttpClientType ApacheHttpClient4
public static final ScrapingHttpClientType NingAsyncHttpClient
public static final ScrapingHttpClientType AsyncHttpClient2
public static final ScrapingHttpClientType CurlHttpClient
public static ScrapingHttpClientType[] values()
for (ScrapingHttpClientType c : ScrapingHttpClientType.values()) System.out.println(c);
public static ScrapingHttpClientType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null@NotNull public static ScrapingHttpClientType getDefaultClientType()
public abstract ScrapingHttpClient prepareNewClient(@NotNull ScrapingSession session)
session
- The session this client will be used forjava.lang.IllegalStateException
- If there is an error preparing the client. Assuming a normal install with all files in the correct places, this should never happen@NotNull public java.lang.String getDisplayName()
public java.lang.String toString()
toString
in class java.lang.Enum<ScrapingHttpClientType>
@Nullable public static ScrapingHttpClientType fromString(@NotNull java.lang.String text)
text
- The text to convert back to a client type