|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.dpml.transit.monitor.AbstractMonitorRouter net.dpml.transit.monitor.CacheMonitorRouter
The cache monitor router is responsible for the dispatiching of cache monitor events to registered monitors.
Field Summary |
Fields inherited from interface net.dpml.transit.monitor.Monitor |
BOOTSTRAP_DEBUG_KEY |
Constructor Summary | |
CacheMonitorRouter()
|
Method Summary | |
void |
addedToLocalCache(URL resource,
File localFile)
Notify all monitors that a request artifact has been added to the local cache. |
void |
addMonitor(Monitor monitor)
Addition of a monitor to the list of monitors maintained by this router. |
void |
failedDownload(Artifact artifact)
Notify all monitors that an artifact request failed. |
void |
failedDownloadFromHost(String host,
Artifact artifact,
Throwable cause)
Notify all monitors that an artifact request on a named host failed. |
void |
removedFromLocalCache(URL resource,
File localFile)
Notify all monitors that an artifact in the local cache was removed. |
void |
resourceRequested(Artifact artifact)
Notify all monitors that a request for an artifact has been received. |
void |
updatedLocalCache(URL resource,
File localFile)
Notify all monitors that an artifact in the local cache has been updated. |
Methods inherited from class net.dpml.transit.monitor.AbstractMonitorRouter |
removeMonitor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.dpml.transit.monitor.Router |
removeMonitor |
Constructor Detail |
public CacheMonitorRouter()
Method Detail |
public void resourceRequested(Artifact artifact)
resourceRequested
in interface CacheMonitor
artifact
- the requested artifactpublic void addedToLocalCache(URL resource, File localFile)
addedToLocalCache
in interface CacheMonitor
resource
- the url of the remote resourcelocalFile
- the local file added to the cachepublic void updatedLocalCache(URL resource, File localFile)
updatedLocalCache
in interface CacheMonitor
resource
- the url of the remote resourcelocalFile
- the local file that was modifiedpublic void removedFromLocalCache(URL resource, File localFile)
removedFromLocalCache
in interface CacheMonitor
resource
- the url of the remote resourcelocalFile
- the local file that was removedpublic void failedDownloadFromHost(String host, Artifact artifact, Throwable cause)
failedDownloadFromHost
in interface CacheMonitor
host
- the remote hostartifact
- the requested artifactcause
- the cause of the failurepublic void failedDownload(Artifact artifact)
failedDownload
in interface CacheMonitor
artifact
- the requested artifactpublic void addMonitor(Monitor monitor) throws IllegalArgumentException
addMonitor
in interface Router
addMonitor
in class AbstractMonitorRouter
monitor
- the monitor to add
IllegalArgumentException
- if the monitor does not implement CacheMonitor
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |