|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.acorn.trace.TraceableSupport
public class TraceableSupport
A support class for traceable objects implementing default methods.
Note that this implementation doesn't maintain traces at resource level.
| Constructor Summary | |
|---|---|
TraceableSupport()
Constructs a new traceable. |
|
TraceableSupport(Traceable adaptee)
Constructs a new traceable adapter. |
|
| Method Summary | |
|---|---|
void |
addTraceListener(TraceListener listener)
Adds a listener if not already present. |
void |
clearTraceListeners()
Clears all listeners from this traceable. |
long |
getLastInitialized()
Gets the timestamp of the last initialization of the traced object. |
long |
getLastModified()
Gets the timestamp of the last modification of the traced object. |
long |
getLastModified(Object key)
Gets the timestamp of the last modification of the specified resource. |
void |
notifyTraceListeners()
Notifies listeners if this trace has been modified. |
void |
notifyTraceListeners(Object key)
Notifies listeners with the specified resource if this trace has been modified. |
void |
notifyTraceListeners(TraceEvent event)
Notifies listeners with the specified event when this trace has been modified. |
void |
removeTraceListener(TraceListener listener)
Removes a listener. |
void |
setLastModified(Object key,
long timestamp)
Sets the timestamp of the last modification of the specified resource. |
int |
traceListenerCount()
Returns the number of listeners. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TraceableSupport()
public TraceableSupport(Traceable adaptee)
adaptee - the adaptee.| Method Detail |
|---|
public long getLastInitialized()
Traceable
getLastInitialized in interface Traceablepublic long getLastModified()
Traceable
getLastModified in interface Traceablepublic long getLastModified(Object key)
Traceable
getLastModified in interface Traceablekey - the key of the resource.
public void setLastModified(Object key,
long timestamp)
Traceable
setLastModified in interface Traceablekey - the key of the resource.timestamp - the modification timestamp.public void addTraceListener(TraceListener listener)
Traceable
addTraceListener in interface Traceablelistener - a listener to add.public void removeTraceListener(TraceListener listener)
Traceable
removeTraceListener in interface Traceablelistener - the listener to remove.public void clearTraceListeners()
Traceable
clearTraceListeners in interface Traceablepublic int traceListenerCount()
public void notifyTraceListeners()
public void notifyTraceListeners(Object key)
key - the resource key.public void notifyTraceListeners(TraceEvent event)
event - the trace event.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||