|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This service provides a central repository for storing URL informations
It should be extended to also provide access to their contents
Field Summary | |
static java.lang.String |
SERVICE_NAME
The service name |
static int |
STATUS_ANY
Matches any status in a list() operation |
static int |
STATUS_BAD
This URL is not currently available for use |
static int |
STATUS_CONTENT_ERROR
The content of this URL is corrupted or unparseable |
static int |
STATUS_OK
The URL can be fetched corretcly |
static int |
STATUS_TEMPORARY_UNAVAILABLE
A possibly transient problem prevented the system to fetch this URL |
static int |
STATUS_UNKNOWN
Current status is unknown |
static int |
STATUS_UNREACHABLE
The URL has permanent fatal errors |
Method Summary | |
URLInfo |
getInfo(java.lang.String url)
Get the information record stored in the database about an URL. |
java.lang.String |
getProxyHost(java.lang.String protocol)
Return the proxy's hostname for a protocol. |
int |
getProxyPort(java.lang.String protocol)
Return the proxy's port for a protocol. |
boolean |
isOK(java.lang.String url)
Test whether the URL is currently believed to be OK by this repository. |
java.util.List |
list()
List of the current known URLs in the repository |
java.util.List |
list(int status)
List of the current known URLs in the repository which have the given status. |
void |
register(java.lang.String url)
Registers a new URL record |
void |
register(java.lang.String url,
int status)
Registers a new URL record. |
void |
register(java.lang.String url,
int status,
java.lang.String message)
Registers a new URL record. |
void |
register(URLInfo info)
Register or replace an URL record. |
void |
unregister(java.lang.String url)
Unregister an URL from the repository |
Methods inherited from interface org.apache.turbine.services.Service |
getConfiguration, getName, getProperties, setName, setServiceBroker |
Methods inherited from interface org.apache.turbine.services.Initable |
getInit, init, init, setInitableBroker, shutdown |
Field Detail |
public static final java.lang.String SERVICE_NAME
public static final int STATUS_ANY
public static final int STATUS_UNKNOWN
public static final int STATUS_OK
public static final int STATUS_UNREACHABLE
public static final int STATUS_TEMPORARY_UNAVAILABLE
public static final int STATUS_CONTENT_ERROR
public static final int STATUS_BAD
Method Detail |
public void register(java.lang.String url)
url
- the url to registerpublic void register(java.lang.String url, int status)
url
- the url to registerstatus
- the status of this urlpublic void register(java.lang.String url, int status, java.lang.String message)
url
- the url to registerstatus
- the status of this urlmessage
- a descriptive message of the statuspublic void register(URLInfo info)
info
- the info record to storepublic void unregister(java.lang.String url)
url
- the url to removepublic URLInfo getInfo(java.lang.String url)
url
- the url whose record is sought
public boolean isOK(java.lang.String url)
url
- the url to be tested
public java.util.List list()
public java.util.List list(int status)
status
- the status to be retrieved. May be
STATUS_ANY
to indicate any status
public int getProxyPort(java.lang.String protocol)
protocol
- The protocol that the proxy supports, e.g. 'http'
public java.lang.String getProxyHost(java.lang.String protocol)
protocol
- The protocol that the proxy supports, e.g. 'http'
null
if no proxy is specified for this protocol
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |