Class SCProxy
- java.lang.Object
-
- com.digitalpebble.stormcrawler.proxy.SCProxy
-
public class SCProxy extends Object
Proxy class is used as the central interface to proxy based interactions with a single remote server The class stores all information relating to the remote server, authentication, and usage activity
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
LOG
-
Constructor Summary
Constructors Constructor Description SCProxy(String connectionString)
Construct a proxy object from a valid proxy connection stringSCProxy(String protocol, String address, String port, String username, String password, String country, String area, String location, String status)
Construct a proxy class from it's variables
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAddress()
String
getArea()
String
getCountry()
String
getLocation()
String
getPassword()
String
getPort()
String
getProtocol()
String
getStatus()
int
getUsage()
Retrieves the current usage of the proxyString
getUsername()
void
incrementUsage()
Increments the usage tracker for the proxyString
toString()
Formats the proxy information into a URL compatible connection string
-
-
-
Constructor Detail
-
SCProxy
public SCProxy(String connectionString) throws IllegalArgumentException
Construct a proxy object from a valid proxy connection string- Throws:
IllegalArgumentException
-
-
Method Detail
-
toString
public String toString()
Formats the proxy information into a URL compatible connection string
-
incrementUsage
public void incrementUsage()
Increments the usage tracker for the proxy
-
getUsage
public int getUsage()
Retrieves the current usage of the proxy
-
getProtocol
public String getProtocol()
-
getAddress
public String getAddress()
-
getPort
public String getPort()
-
getUsername
public String getUsername()
-
getPassword
public String getPassword()
-
getCountry
public String getCountry()
-
getArea
public String getArea()
-
getLocation
public String getLocation()
-
getStatus
public String getStatus()
-
-