public class UrlPacScriptSource extends Object implements PacScriptSource
| Modifier and Type | Field and Description |
|---|---|
static String |
OVERRIDE_CONNECT_TIMEOUT |
static String |
OVERRIDE_READ_TIMEOUT |
| Constructor and Description |
|---|
UrlPacScriptSource(String url)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
String |
getScriptContent()
getScriptContent
|
protected int |
getTimeOut(String overrideProperty,
int defaultValue)
Gets the timeout value from a property or uses the given default value if
the property cannot be parsed.
|
boolean |
isScriptValid()
isScriptValid
|
String |
toString() |
public static final String OVERRIDE_CONNECT_TIMEOUT
public static final String OVERRIDE_READ_TIMEOUT
public UrlPacScriptSource(String url)
url - the URL to download the script from.public String getScriptContent() throws IOException
getScriptContent in interface PacScriptSourceIOException - on read error.PacScriptSource.getScriptContent()protected int getTimeOut(String overrideProperty, int defaultValue)
overrideProperty - the property to define the timeout value in millisecondsdefaultValue - the default timeout value in milliseconds.public String toString()
toString in class ObjectObject.toString()public boolean isScriptValid()
isScriptValid in interface PacScriptSourcePacScriptSource.isScriptValid()Copyright © 2022. All rights reserved.