org.norther.tammi.acorn.trace
Interface Traceable

All Known Implementing Classes:
Account, Configuration, MultiSelectionList, MultiSelectionTree, SampleResourceBundle, SearchBox, SingleSelectionList, SingleSelectionTree, TraceableSupport, VariableX, VariableY, VariableZ

public interface Traceable

An interface to traceable resources.

Author:
Ilkka Priha

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 removeTraceListener(TraceListener listener)
          Removes a listener.
 void setLastModified(Object key, long timestamp)
          Sets the timestamp of the last modification of the specified resource.
 

Method Detail

getLastInitialized

long getLastInitialized()
Gets the timestamp of the last initialization of the traced object.

Returns:
the initialization timestamp.

getLastModified

long getLastModified()
Gets the timestamp of the last modification of the traced object.

Returns:
the modification timestamp.

getLastModified

long getLastModified(Object key)
Gets the timestamp of the last modification of the specified resource.

Parameters:
key - the key of the resource.
Returns:
the modification timestamp.

setLastModified

void setLastModified(Object key,
                     long timestamp)
Sets the timestamp of the last modification of the specified resource. This is a clumsy way to maintain original timestamps of resources copied between objects, so implementors are encouraged to provide timestamped setters to be applied instead of this method.

Parameters:
key - the key of the resource.
timestamp - the modification timestamp.

addTraceListener

void addTraceListener(TraceListener listener)
Adds a listener if not already present.

Parameters:
listener - a listener to add.
Throws:
NullPointerException - if listener is null.

removeTraceListener

void removeTraceListener(TraceListener listener)
Removes a listener.

Parameters:
listener - the listener to remove.

clearTraceListeners

void clearTraceListeners()
Clears all listeners from this traceable.



Copyright © 2004 The Norther Organization. All rights reserved.