public class CloudControllerClient
extends java.lang.Object
Constructor and Description |
---|
CloudControllerClient(ScrapingSession session,
java.lang.String url,
java.lang.String username,
java.lang.String password)
Constructs a cloud controller client
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
getScrapes()
Returns a set of names of scrapes that are imported into the cloud controller
|
boolean |
startSession(java.lang.String sessionName)
Tells the cloud controller to launch a new scraping session by name
|
public CloudControllerClient(ScrapingSession session, java.lang.String url, java.lang.String username, java.lang.String password)
session
- The current scraping sessionurl
- The url where the cloud controller API is locatedusername
- The username for authenticating to the APIpassword
- The password for authenticating to the APIpublic boolean startSession(java.lang.String sessionName) throws java.io.IOException
sessionName
- The name of the scraping session to launchjava.io.IOException
- If there is an error starting the scrape@NotNull public java.util.Set<java.lang.String> getScrapes() throws java.io.IOException, org.json.simple.parser.ParseException
java.io.IOException
- If there is an error getting the scrape listorg.json.simple.parser.ParseException
- If the response comes back in a format that cannot be parsed