stella.io
Class CacheChangedEvent

java.lang.Object
  extended by java.util.EventObject
      extended by stella.io.CacheChangedEvent
All Implemented Interfaces:
Serializable

public class CacheChangedEvent
extends EventObject

An event signaling that the value mapped to a specific key in a polling server's cache has changed. Registered listeners get an event of this type passed to their CacheChangedListener.newValue(stella.io.CacheChangedEvent) method. Note that this event also carries the value of the key to allow the listener to judge whether the event was received accidently.

This event is a purely internal one. No rmi-transport is ever intended. Therefore, alle definitions are found in this package, and this event class only extends the generic EventObject class rather than the {stella.rmi.RmiEvent} class. Additionally, the appropriate caster interface does not implement the genric Caster interface.

See Also:
Serialized Form

Field Summary
private  String key
          The key in the cache, i.e.
private  String value
          The new value in the cache, i.e.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CacheChangedEvent(Object src, String cachekey, String newval)
          Constructs a new cache changed event.
 
Method Summary
 String getCommand()
          The accessor method for the cache key, i.e.
 String getReply()
          The accessor method for the new cache value, i.e.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

key

private String key
The key in the cache, i.e. the serial command sent.


value

private String value
The new value in the cache, i.e. the serial reply.

Constructor Detail

CacheChangedEvent

public CacheChangedEvent(Object src,
                         String cachekey,
                         String newval)
Constructs a new cache changed event. Both String arguments allow the null value.

Parameters:
src - The event source.
cachekey - The key in the cache look-up table, i.e. the serial command.
newval - The new value, i.e. the serial reply.
Method Detail

getCommand

public String getCommand()
The accessor method for the cache key, i.e. the serial command.


getReply

public String getReply()
The accessor method for the new cache value, i.e. the serial reply.