com.alachisoft.jvcache.event
Class CustomEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.alachisoft.jvcache.event.CustomEvent
All Implemented Interfaces:
java.io.Serializable

public class CustomEvent
extends java.util.EventObject

CustomEvent is used to notify interested parties that something has happened with respect to a custom event.

See Also:
Serialized Form

Nested Class Summary
static class CustomEvent.EventType
          Defines the CUSTOM event type, along with its string representation, returned by toString().
 
Constructor Summary
CustomEvent(java.lang.Object source, CustomEvent.EventType type, java.lang.Object key, java.lang.Object value)
          Creates a new object representing a custom event.
 
Method Summary
 CustomEvent.EventType getEventType()
          Gets the type of event.
 java.lang.Object getKey()
          Returns the Key of the item for which this event occured.
 java.lang.Object getValue()
          Returns the Value of the item for which this event occured.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CustomEvent

public CustomEvent(java.lang.Object source,
                   CustomEvent.EventType type,
                   java.lang.Object key,
                   java.lang.Object value)
Creates a new object representing a custom event.

Parameters:
source - the cache object responsible for the event
type - the event type
key - the key of the item.
value - the value of the item.
Method Detail

getEventType

public CustomEvent.EventType getEventType()
Gets the type of event.

Returns:
the type

getKey

public java.lang.Object getKey()
Returns the Key of the item for which this event occured.

Returns:
Returns the Key of the item for which this event occured.

getValue

public java.lang.Object getValue()
Returns the Value of the item for which this event occured.

Returns:
Returns the Key of the item for which this event occured.