public class LinkInfo extends Object
Modifier and Type | Field and Description |
---|---|
static int |
X_STATUS_CONNECT_ERROR |
static int |
X_STATUS_IO_ERROR |
static int |
X_STATUS_NO_ROUTE_TO_HOST |
static int |
X_STATUS_NOT_CHECKED |
static int |
X_STATUS_SSL_ERROR |
static int |
X_STATUS_UNKOWN_HOST |
static int |
X_STATUS_UNSUPPORTED |
static int |
X_STATUS_URI_SYNTAX_ERROR |
Constructor and Description |
---|
LinkInfo(LinkInfo base)
Initializes a new instance based on the given one.
|
LinkInfo(String url)
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addReferrer(String path)
Adds (if not already present) a referrer to this link.
|
boolean |
equals(Object o) |
Calendar |
getLastAccessed()
Returns the date a check for validity of the URL has last been requested.
|
Calendar |
getLastAvailable()
Returns the date the resource described by the URL has last been available.
|
Calendar |
getLastChecked()
Returns the date the URL has last been checked by the asynchronous LinkCheckerTask.
|
int |
getLastStatus()
Returns the last status
|
String |
getLastStatusAsString() |
String[] |
getReferrer()
Returns the paths referencing this link
|
String |
getUrl()
Returns the URL about which validity information is stored.
|
int |
hashCode() |
boolean |
isSame(LinkInfo linkInfo) |
boolean |
isValid()
Returns whether the resource described by the URL is currently available.
|
void |
setLastAccessed(Calendar lastAccessed)
Sets the date a check for validity of the URL has last been requested.
|
void |
setLastAvailable(Calendar lastAvailable)
Sets the date the resource described by the URL has last been available.
|
void |
setLastChecked(Calendar lastChecked)
Sets the date the URL has last been checked by the asynchronous LinkCheckerTask.
|
void |
setLastStatus(int lastStatus)
Sets the last status
|
void |
setValid(boolean valid)
Sets whether the resource described by the URL is currently available.
|
public static final int X_STATUS_NOT_CHECKED
public static final int X_STATUS_UNSUPPORTED
public static final int X_STATUS_URI_SYNTAX_ERROR
public static final int X_STATUS_CONNECT_ERROR
public static final int X_STATUS_NO_ROUTE_TO_HOST
public static final int X_STATUS_UNKOWN_HOST
public static final int X_STATUS_IO_ERROR
public static final int X_STATUS_SSL_ERROR
public LinkInfo(String url)
url
- The URL to store validity information aboutpublic LinkInfo(LinkInfo base)
base
- info to copy frompublic Calendar getLastAccessed()
public void setLastAccessed(Calendar lastAccessed)
lastAccessed
- The date the check for validity of the URL has last been requestedpublic Calendar getLastChecked()
public void setLastChecked(Calendar lastChecked)
lastChecked
- The date the URL has last been checkedpublic Calendar getLastAvailable()
public void setLastAvailable(Calendar lastAvailable)
lastAvailable
- The date the resource described by the URL has last been available.public String getUrl()
public boolean isValid()
public void setValid(boolean valid)
valid
- Whether the resource described by the URL is currently availablepublic int getLastStatus()
public String getLastStatusAsString()
public void setLastStatus(int lastStatus)
lastStatus
- the last statuspublic void addReferrer(String path)
path
- the path of the node referencing this linkpublic String[] getReferrer()
public boolean isSame(LinkInfo linkInfo)
"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"