public class URLCallback extends Object implements Callback
URLCallback to the invokeCallback
method of a CallbackHandler to retrieve URL information.CallbackHandler| Modifier and Type | Field and Description |
|---|---|
private String |
defaultURL |
private String |
inputURL |
private String |
prompt |
| Constructor and Description |
|---|
URLCallback(String prompt)
Construct a
URLCallback with a prompt. |
URLCallback(String prompt,
String defaultURL)
Construct a
URLCallback with a prompt
and default URL. |
| Modifier and Type | Method and Description |
|---|---|
String |
getdefaultURL()
Get the default URL.
|
String |
getPrompt()
Get the prompt.
|
String |
getURL()
The retrieved URL.
|
void |
setURL(String URL)
Set the value of the URL attribute.
|
private String prompt
private String defaultURL
private String inputURL
public URLCallback(String prompt)
URLCallback with a prompt.prompt - The prompt used to request the URL.IllegalArgumentException - if prompt is null
or if prompt has a length of 0.public URLCallback(String prompt, String defaultURL)
URLCallback with a prompt
and default URL.prompt - The prompt used to request the information.defaultURL - The URL used as the default URL displayed
with the prompt.IllegalArgumentException - if prompt is null,
if prompt has a length of 0,
if defaultURL is null,
or if defaultURL has a length of 0.public String getPrompt()
public String getdefaultURL()
URLCallback
was not instantiated with a defaultURL.public void setURL(String URL)
URL - The retrieved URL (which may be null).URLCallback.getURL()public String getURL()