public class LinkInfo
extends java.lang.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_READ_TIME_OUT_ERROR |
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(java.lang.String url)
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addReferrer(java.lang.String path)
Adds (if not already present) a referrer to this link.
|
boolean |
equals(java.lang.Object o) |
java.util.Calendar |
getLastAccessed()
Returns the date a check for validity of the URL has last been requested.
|
java.util.Calendar |
getLastAvailable()
Returns the date the resource described by the URL has last been available.
|
java.util.Calendar |
getLastChecked()
Returns the date the URL has last been checked by the asynchronous LinkCheckerTask.
|
int |
getLastStatus()
Returns the last status
|
java.lang.String |
getLastStatusAsString() |
java.lang.String[] |
getReferrer()
Returns the paths referencing this link
|
java.lang.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(java.util.Calendar lastAccessed)
Sets the date a check for validity of the URL has last been requested.
|
void |
setLastAvailable(java.util.Calendar lastAvailable)
Sets the date the resource described by the URL has last been available.
|
void |
setLastChecked(java.util.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 static final int X_STATUS_READ_TIME_OUT_ERROR
public LinkInfo(java.lang.String url)
url
- The URL to store validity information aboutpublic LinkInfo(LinkInfo base)
base
- info to copy frompublic java.util.Calendar getLastAccessed()
public void setLastAccessed(java.util.Calendar lastAccessed)
lastAccessed
- The date the check for validity of the URL has last been requestedpublic java.util.Calendar getLastChecked()
public void setLastChecked(java.util.Calendar lastChecked)
lastChecked
- The date the URL has last been checkedpublic java.util.Calendar getLastAvailable()
public void setLastAvailable(java.util.Calendar lastAvailable)
lastAvailable
- The date the resource described by the URL has last been available.public java.lang.String getUrl()
public boolean isValid()
public void setValid(boolean valid)
valid
- Whether the resource described by the URL is currently availablepublic int getLastStatus()
public java.lang.String getLastStatusAsString()
public void setLastStatus(int lastStatus)
lastStatus
- the last statuspublic void addReferrer(java.lang.String path)
path
- the path of the node referencing this linkpublic java.lang.String[] getReferrer()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean isSame(LinkInfo linkInfo)
public int hashCode()
hashCode
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved