-
- All Implemented Interfaces:
-
kotlin.Comparable
public class ProxyEntry2 implements Comparable<ProxyEntry2>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumProxyEntry2.Statuspublic enumProxyEntry2.BanStatepublic classProxyEntry2.Companion
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ProxyEntry2(String host, Integer port, String username, String password, Proxy.Type proxyType, Instant declaredTTL)
-
Method Summary
Modifier and Type Method Description final IntegergetId()The proxy entry id, it's unique in the process scope final UnitsetId(Integer id)The proxy entry id, it's unique in the process scope final StringgetOutIp()The out ip which will be seen by the target site final UnitsetOutIp(String outIp)The out ip which will be seen by the target site final StringgetLastTarget()The last target url final UnitsetLastTarget(String lastTarget)The last target url final List<URL>getTestUrls()The test urls final UnitsetTestUrls(List<URL> testUrls)The test urls final URLgetDefaultTestUrl()The default test url final UnitsetDefaultTestUrl(URL defaultTestUrl)The default test url final BooleangetIsTestIp()Check if the proxy is used for test final UnitsetIsTestIp(Boolean isTestIp)Check if the proxy is used for test final StringgetProtocol()final StringgetHostPort()final StringgetSegment()final StringgetOutSegment()final InstantgetStartTime()final DurationgetElapsedTime()final StringgetDisplay()final StringgetMetadata()final Function2<URL, Proxy, Boolean>getNetworkTester()final UnitsetNetworkTester(Function2<URL, Proxy, Boolean> networkTester)final AtomicIntegergetNumTests()final AtomicIntegergetNumConnectionLosses()final AtomicLonggetAccumResponseMillis()final InstantgetAvailableTime()final UnitsetAvailableTime(Instant availableTime)final AtomicIntegergetNumFailedPages()final AtomicIntegergetNumSuccessPages()final ConcurrentHashMultiset<String>getServedDomains()final AtomicReference<ProxyEntry2.Status>getStatus()final DoublegetTestSpeed()final InstantgetTtl()final DurationgetTtlDuration()final BooleangetIsExpired()final BooleangetIsRetired()final BooleangetIsFree()final BooleangetIsWorking()final BooleangetIsBanned()final BooleangetIsFailed()final BooleangetIsGone()final AtomicIntegergetNumRunningTasks()final InstantgetLastActiveTime()Last time to use this proxy final UnitsetLastActiveTime(Instant lastActiveTime)Last time to use this proxy final DurationgetIdleTimeout()final UnitsetIdleTimeout(Duration idleTimeout)final DurationgetIdleTime()final BooleangetIsIdle()final BooleangetIsReady()final StringgetReadableState()final StringgetHost()The host of the proxy server final UnitsetHost(String host)The host of the proxy server final IntegergetPort()The port of the proxy server final UnitsetPort(Integer port)The port of the proxy server final StringgetUsername()The username final UnitsetUsername(String username)The username final StringgetPassword()The password final UnitsetPassword(String password)The password final Proxy.TypegetProxyType()The proxy type final UnitsetProxyType(Proxy.Type proxyType)The proxy type final InstantgetDeclaredTTL()The time to live of the proxy entry declared by the proxy vendor final UnitsetDeclaredTTL(Instant declaredTTL)The time to live of the proxy entry declared by the proxy vendor final URItoURI()final BooleanwillExpireAt(Instant instant)final BooleanwillExpireAfter(Duration duration)final UnitsetFree()final UnitstartWork()final Unitretire()final Unitrefresh()final BooleancanConnect()final Booleantest()final Booleantest(URL target, Duration timeout)final Stringserialize()The string representation, can be parsed using parse or deserialize final Stringformat()The string representation, can be parsed using parse or deserialize final ProxyEntrytoProxyEntry()IntegerhashCode()Booleanequals(Object other)StringtoString()The string representation, can be parsed using parse IntegercompareTo(ProxyEntry2 other)-
-
Method Detail
-
getLastTarget
final String getLastTarget()
The last target url
-
setLastTarget
final Unit setLastTarget(String lastTarget)
The last target url
-
getTestUrls
final List<URL> getTestUrls()
The test urls
-
setTestUrls
final Unit setTestUrls(List<URL> testUrls)
The test urls
-
getDefaultTestUrl
final URL getDefaultTestUrl()
The default test url
-
setDefaultTestUrl
final Unit setDefaultTestUrl(URL defaultTestUrl)
The default test url
-
getIsTestIp
final Boolean getIsTestIp()
Check if the proxy is used for test
-
setIsTestIp
final Unit setIsTestIp(Boolean isTestIp)
Check if the proxy is used for test
-
getProtocol
final String getProtocol()
-
getHostPort
final String getHostPort()
-
getSegment
final String getSegment()
-
getOutSegment
final String getOutSegment()
-
getStartTime
final Instant getStartTime()
-
getElapsedTime
final Duration getElapsedTime()
-
getDisplay
final String getDisplay()
-
getMetadata
final String getMetadata()
-
getNetworkTester
final Function2<URL, Proxy, Boolean> getNetworkTester()
-
setNetworkTester
final Unit setNetworkTester(Function2<URL, Proxy, Boolean> networkTester)
-
getNumTests
final AtomicInteger getNumTests()
-
getNumConnectionLosses
final AtomicInteger getNumConnectionLosses()
-
getAccumResponseMillis
final AtomicLong getAccumResponseMillis()
-
getAvailableTime
final Instant getAvailableTime()
-
setAvailableTime
final Unit setAvailableTime(Instant availableTime)
-
getNumFailedPages
final AtomicInteger getNumFailedPages()
-
getNumSuccessPages
final AtomicInteger getNumSuccessPages()
-
getServedDomains
final ConcurrentHashMultiset<String> getServedDomains()
-
getStatus
final AtomicReference<ProxyEntry2.Status> getStatus()
-
getTestSpeed
final Double getTestSpeed()
-
getTtlDuration
final Duration getTtlDuration()
-
getIsExpired
final Boolean getIsExpired()
-
getIsRetired
final Boolean getIsRetired()
-
getIsWorking
final Boolean getIsWorking()
-
getIsBanned
final Boolean getIsBanned()
-
getIsFailed
final Boolean getIsFailed()
-
getNumRunningTasks
final AtomicInteger getNumRunningTasks()
-
getLastActiveTime
final Instant getLastActiveTime()
Last time to use this proxy
-
setLastActiveTime
final Unit setLastActiveTime(Instant lastActiveTime)
Last time to use this proxy
-
getIdleTimeout
final Duration getIdleTimeout()
-
setIdleTimeout
final Unit setIdleTimeout(Duration idleTimeout)
-
getIdleTime
final Duration getIdleTime()
-
getIsReady
final Boolean getIsReady()
-
getReadableState
final String getReadableState()
-
getUsername
final String getUsername()
The username
-
setUsername
final Unit setUsername(String username)
The username
-
getPassword
final String getPassword()
The password
-
setPassword
final Unit setPassword(String password)
The password
-
getProxyType
final Proxy.Type getProxyType()
The proxy type
-
setProxyType
final Unit setProxyType(Proxy.Type proxyType)
The proxy type
-
getDeclaredTTL
final Instant getDeclaredTTL()
The time to live of the proxy entry declared by the proxy vendor
-
setDeclaredTTL
final Unit setDeclaredTTL(Instant declaredTTL)
The time to live of the proxy entry declared by the proxy vendor
-
willExpireAt
final Boolean willExpireAt(Instant instant)
-
willExpireAfter
final Boolean willExpireAfter(Duration duration)
-
canConnect
final Boolean canConnect()
-
serialize
final String serialize()
The string representation, can be parsed using parse or deserialize
-
format
final String format()
The string representation, can be parsed using parse or deserialize
-
toProxyEntry
final ProxyEntry toProxyEntry()
-
compareTo
Integer compareTo(ProxyEntry2 other)
-
-
-
-