|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.components.source.DelayedRefreshSourceWrapper
public final class DelayedRefreshSourceWrapper
A wrapper around a Source
that reduces the number of calls to
Source.getLastModified()
which can be a costly operation.
Constructor Summary | |
---|---|
DelayedRefreshSourceWrapper(Source source,
long delay)
Deprecated. Creates a wrapper for a Source which ensures that
Source.getLastModified() won't be called more than once per
delay milliseconds period. |
Method Summary | |
---|---|
long |
getContentLength()
Deprecated. Get the content length of the source or -1 if it is not possible to determine the length. |
InputSource |
getInputSource()
Deprecated. Return an InputSource object to read the XML
content. |
InputStream |
getInputStream()
Deprecated. Return an InputStream object to read from the source. |
long |
getLastModified()
Deprecated. Get the last modification time for the wrapped Source . |
String |
getSystemId()
Deprecated. Return the unique identifer for this source |
void |
recycle()
Deprecated. |
void |
refresh()
Deprecated. Force the refresh of the wrapped Source , even if the refresh period
isn't over, and starts a new period. |
void |
toSAX(ContentHandler handler)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DelayedRefreshSourceWrapper(Source source, long delay)
Source
which ensures that
Source.getLastModified()
won't be called more than once per
delay
milliseconds period.
source
- the wrapped Source
delay
- the last-modified refresh delay, in millisecondsMethod Detail |
---|
public final long getLastModified()
Source
. The
age of the returned information is guaranteed to be lower than or equal to
the delay specified in the constructor.
This method is also thread-safe, even if the underlying Source is not.
getLastModified
in interface Source
public final void refresh()
Source
, even if the refresh period
isn't over, and starts a new period.
This method is thread-safe, even if the underlying Source is not.
refresh
in interface ModifiableSource
public final long getContentLength()
Source
getContentLength
in interface Source
public final InputStream getInputStream() throws ProcessingException, IOException
Source
InputStream
object to read from the source.
getInputStream
in interface Source
ProcessingException
IOException
public final InputSource getInputSource() throws ProcessingException, IOException
Source
InputSource
object to read the XML
content.
getInputSource
in interface Source
InputSource
value
ProcessingException
- if an error occurs
IOException
- if an error occurspublic final String getSystemId()
Source
getSystemId
in interface Source
public final void recycle()
recycle
in interface Recyclable
public final void toSAX(ContentHandler handler) throws SAXException
toSAX
in interface XMLizable
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |