|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.dpml.transit.monitor.CacheMonitorAdapter
public class CacheMonitorAdapter
Adapts cache events to logging messages.
Monitor
Field Summary |
---|
Fields inherited from interface net.dpml.transit.monitor.Monitor |
---|
BOOTSTRAP_DEBUG_KEY |
Constructor Summary | |
---|---|
CacheMonitorAdapter(Adapter adapter)
Creation of a new adaptive cache monitor. |
Method Summary | |
---|---|
void |
addedToLocalCache(URL resource,
File localFile)
Notify the monitor that an artifact has been added to the local cache. |
void |
failedDownload(Artifact artifact)
Notify the monitor of a failed download attempt. |
void |
failedDownloadFromHost(String host,
Artifact artifact,
Throwable e)
Notify the monitor of a failed download attempt relative to an identified host. |
protected Adapter |
getAdapter()
Returns the adapter assigned to this adaptive monitor. |
boolean |
isTraceEnabled()
Test is debug trace monitoring is enabled. |
void |
removedFromLocalCache(URL resource,
File localFile)
Notify the monitor that an artifact has been removed from the local cache. |
void |
resourceRequested(Artifact artifact)
Notify the monitor that an artifact has been requested. |
void |
trace(String message)
Notify the monitor of a trace level message to log. |
void |
updatedLocalCache(URL resource,
File localFile)
Notify the monitor that an artifact in the local cache has been updated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheMonitorAdapter(Adapter adapter)
adapter
- the adapter to assign to the monitorMethod 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 resource added to the local cachelocalFile
- the local file resident in the cachepublic void updatedLocalCache(URL resource, File localFile)
updatedLocalCache
in interface CacheMonitor
resource
- the url of the resource updating the local cachelocalFile
- the local file that has been updatedpublic void removedFromLocalCache(URL resource, File localFile)
removedFromLocalCache
in interface CacheMonitor
resource
- the url of the resource removed from the local cachelocalFile
- the local file removed from the cachepublic void failedDownloadFromHost(String host, Artifact artifact, Throwable e)
failedDownloadFromHost
in interface CacheMonitor
host
- the host raising the fail statusartifact
- the requested artifacte
- the exception causing the failurepublic void failedDownload(Artifact artifact)
failedDownload
in interface CacheMonitor
artifact
- the requested artifactpublic boolean isTraceEnabled()
public void trace(String message)
message
- the trace level message to logprotected Adapter getAdapter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |