|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.turbine.services.BaseInitable org.apache.turbine.services.BaseService org.apache.turbine.services.TurbineBaseService org.apache.jetspeed.services.urlmanager.JetspeedURLManagerService
This implementation of the URLManagerService is backed by a simple map persisted on disk in a properties file
Added: Support for proxies.JetspeedResources.properties
)services.URLManager.proxy.http.host=myproxy.mydomain
services.URLManager.proxy.http.port=81
URLManagerService
Field Summary |
Fields inherited from class org.apache.turbine.services.BaseService |
configuration, name, properties, serviceBroker |
Fields inherited from class org.apache.turbine.services.BaseInitable |
initableBroker, isInitialized |
Fields inherited from interface org.apache.jetspeed.services.urlmanager.URLManagerService |
SERVICE_NAME, STATUS_ANY, STATUS_BAD, STATUS_CONTENT_ERROR, STATUS_OK, STATUS_TEMPORARY_UNAVAILABLE, STATUS_UNKNOWN, STATUS_UNREACHABLE |
Constructor Summary | |
JetspeedURLManagerService()
|
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 a proxy's hostname |
int |
getProxyPort(java.lang.String protocol)
Return the port of a proxy |
void |
init()
Late init. |
void |
init(javax.servlet.ServletConfig config)
Called during Turbine.init() |
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 |
shutdown()
Called during Turbine destroy(). |
void |
unregister(java.lang.String url)
Unregister an URL from the repository |
protected void |
writeEscaped(java.io.PrintWriter sink,
java.lang.String element)
Escape values when saving. |
Methods inherited from class org.apache.turbine.services.TurbineBaseService |
init, init |
Methods inherited from class org.apache.turbine.services.BaseService |
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker |
Methods inherited from class org.apache.turbine.services.BaseInitable |
getInit, getInitableBroker, setInit, setInitableBroker |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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, setInitableBroker |
Constructor Detail |
public JetspeedURLManagerService()
Method Detail |
public void init()
init
in interface org.apache.turbine.services.Initable
public void init(javax.servlet.ServletConfig config)
config
- A ServletConfig.public void shutdown()
shutdown
in interface org.apache.turbine.services.Initable
public void register(java.lang.String url)
register
in interface URLManagerService
url
- the url to registerpublic void register(java.lang.String url, int status)
register
in interface URLManagerService
url
- the url to registerstatus
- the status of this urlpublic void register(java.lang.String url, int status, java.lang.String message)
register
in interface URLManagerService
url
- the url to registerstatus
- the status of this urlmessage
- a descriptive message of the statuspublic void register(URLInfo info)
register
in interface URLManagerService
info
- the info record to storepublic void unregister(java.lang.String url)
unregister
in interface URLManagerService
url
- the url to removepublic URLInfo getInfo(java.lang.String url)
getInfo
in interface URLManagerService
url
- the url whose record is sought
public boolean isOK(java.lang.String url)
isOK
in interface URLManagerService
url
- the url to be tested
public java.util.List list()
list
in interface URLManagerService
public java.util.List list(int status)
list
in interface URLManagerService
status
- the status to be retrieved. May be
URLManagerService.STATUS_ANY
to indicate any status
public int getProxyPort(java.lang.String protocol)
getProxyPort
in interface URLManagerService
protocol
- The protocol that the proxy supports, e.g. 'http'
public java.lang.String getProxyHost(java.lang.String protocol)
getProxyHost
in interface URLManagerService
protocol
- The protocol that the proxy supports, e.g. 'http'
null
if no proxy is specified for this protocolprotected void writeEscaped(java.io.PrintWriter sink, java.lang.String element)
Escape values when saving. Appends a String to a StringBuffer, escaping commas.
We assume that commas are unescaped.
sink
- a StringBuffer to write outputelement
- a value to be written
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |