Novell exteNd
Director 5.2 API

com.sssw.fw.api
Interface EbiWhiteboardEraser


public interface EbiWhiteboardEraser

Whiteboard erasers are used to clear key/value pairs from whiteboards. Erasers can be triggered as timed events or by setting a limit on the number of times a key/value pair can be accessed.

See Also:
EbiWhiteboard

Method Summary
 void erase()
          Begins erase processing.
 int getCurrentCounter()
          Returns the number of times the object has been accessed.
 String getEraserName()
          Returns the name of the eraser
 int getLife()
          Returns the time, in milliseconds, the eraser was set to delay, before beginning erase processing.
 int getMaxCounter()
          Returns the maximum allowable accesses for the bound object, before eraser starts processing.
 boolean getRunning()
          Returns a boolean indication of the eraser's running status.
 Thread getThread()
          Returns the Thread that this eraser belongs to.
 EbiWhiteboard getWhiteboard()
          Returns the whiteboard object that contains this eraser.
 void incrementCurrentCounter()
          Increments access counter.
 boolean isCounterExceeded()
          Returns true if the object bound to this eraser has been accessed more than the allowable times.
 boolean isRunning()
          Returns a boolean indication of the eraser's running status.
 void run()
          Starts the eraser Thread.
 void setCurrentCounter(int counter)
          Sets the counter value.
 void setEraserName(String name)
          Sets the name of the eraser.
 void setLife(int time)
          Sets a timer for the eraser.
 void setMaxCounter(int counter)
          Sets a counter for the eraser.
 void setRunning(boolean flag)
          Starts or stops the eraser.
 void setThread(Thread threadName)
          Set the Thread that this eraser belongs to.
 void setWhiteboard(EbiWhiteboard whiteboardName)
          Sets the EbiWhiteboard that this eraser belongs to.
 void stop()
          Stops the eraser processing.
 String toString()
          Returns a String representation of the eraser.
 

Method Detail

getWhiteboard

public EbiWhiteboard getWhiteboard()
Returns the whiteboard object that contains this eraser.
Returns:
The EbiWhiteboard object that contains this eraser.

setWhiteboard

public void setWhiteboard(EbiWhiteboard whiteboardName)
Sets the EbiWhiteboard that this eraser belongs to.
Parameters:
whiteboardName - An EbiWhiteboard object.

getThread

public Thread getThread()
Returns the Thread that this eraser belongs to.
Returns:
Thread containing this eraser.

setThread

public void setThread(Thread threadName)
Set the Thread that this eraser belongs to.
Parameters:
threadName - Thread to associate with this eraser.

getRunning

public boolean getRunning()
Returns a boolean indication of the eraser's running status.
Returns:
A boolean indication of the eraser's running status.
See Also:
EbiWhiteboardEraser.isRunning(), EbiWhiteboardEraser.setRunning(boolean running)

setRunning

public void setRunning(boolean flag)
Starts or stops the eraser.
Parameters:
flag - true to start eraser thread, false to stop eraser thread.
See Also:
EbiWhiteboardEraser.isRunning(), EbiWhiteboardEraser.getRunning()

isRunning

public boolean isRunning()
Returns a boolean indication of the eraser's running status.
Returns:
A boolean indication of the eraser's running status.
See Also:
EbiWhiteboardEraser.getRunning(), EbiWhiteboardEraser.setRunning(boolean running)

stop

public void stop()
Stops the eraser processing.

getEraserName

public String getEraserName()
Returns the name of the eraser
Returns:
The name of the eraser.

setEraserName

public void setEraserName(String name)
Sets the name of the eraser.
Parameters:
name - The name of the eraser.

getLife

public int getLife()
Returns the time, in milliseconds, the eraser was set to delay, before beginning erase processing.
Returns:
Time in milliseconds.

setLife

public void setLife(int time)
Sets a timer for the eraser. The eraser will begin erasing once the timer has expired.
Parameters:
time - The timer value in milliseconds.

isCounterExceeded

public boolean isCounterExceeded()
Returns true if the object bound to this eraser has been accessed more than the allowable times.
Parameters:
Returns - true if the object bound to this eraser has been accessed more than the allowable times.
See Also:
EbiWhiteboardEraser.getMaxCounter(), EbiWhiteboardEraser.setMaxCounter(int counter)

getMaxCounter

public int getMaxCounter()
Returns the maximum allowable accesses for the bound object, before eraser starts processing.
Returns:
Returns the maximum allowable accesses for the bound object, before eraser starts processing.
See Also:
EbiWhiteboardEraser.setMaxCounter(int counter), EbiWhiteboardEraser.isCounterExceeded()

setMaxCounter

public void setMaxCounter(int counter)
Sets a counter for the eraser. The eraser will erase once the object tied to the eraser has been accessed the number of times specified in the counter parameter.
Parameters:
counter - The number of accesses before eraser is activated.
See Also:
EbiWhiteboardEraser.isCounterExceeded(), EbiWhiteboardEraser.getMaxCounter()

incrementCurrentCounter

public void incrementCurrentCounter()
Increments access counter.
See Also:
EbiWhiteboardEraser.isCounterExceeded(), EbiWhiteboardEraser.getMaxCounter(), EbiWhiteboardEraser.setMaxCounter(int counter)

getCurrentCounter

public int getCurrentCounter()
Returns the number of times the object has been accessed.
Returns:
The number of times object to be erased has been accessed.
See Also:
EbiWhiteboardEraser.isCounterExceeded(), EbiWhiteboardEraser.getMaxCounter(), EbiWhiteboardEraser.setMaxCounter(int counter), EbiWhiteboardEraser.incrementCurrentCounter()

setCurrentCounter

public void setCurrentCounter(int counter)
Sets the counter value.
Parameters:
counter - Value to set counter to.
See Also:
EbiWhiteboardEraser.isCounterExceeded(), EbiWhiteboardEraser.getMaxCounter(), EbiWhiteboardEraser.setMaxCounter(int counter), EbiWhiteboardEraser.incrementCurrentCounter(), EbiWhiteboardEraser.getCurrentCounter()

run

public void run()
Starts the eraser Thread.

erase

public void erase()
Begins erase processing.

toString

public String toString()
Returns a String representation of the eraser.
Overrides:
toString in class Object
Returns:
A String representation of the eraser.

Novell exteNd
Director 5.2 API