org.ehcache.impl.config.event
Class DefaultCacheEventListenerConfiguration

java.lang.Object
  extended by org.ehcache.impl.internal.classes.ClassInstanceConfiguration<CacheEventListener<?,?>>
      extended by org.ehcache.impl.config.event.DefaultCacheEventListenerConfiguration
All Implemented Interfaces:
CacheEventListenerConfiguration, ServiceConfiguration<CacheEventListenerProvider>

public class DefaultCacheEventListenerConfiguration
extends org.ehcache.impl.internal.classes.ClassInstanceConfiguration<CacheEventListener<?,?>>
implements CacheEventListenerConfiguration

CacheEventListenerConfiguration implementation


Constructor Summary
DefaultCacheEventListenerConfiguration(java.util.Set<EventType> fireOn, CacheEventListener<?,?> listener)
          Creates a new DefaultCacheEventListenerConfiguration with the provided parameters.
DefaultCacheEventListenerConfiguration(java.util.Set<EventType> fireOn, java.lang.Class<? extends CacheEventListener<?,?>> clazz, java.lang.Object... arguments)
          Creates a new DefaultCacheEventListenerConfiguration with the provided parameters.
 
Method Summary
 java.util.EnumSet<EventType> fireOn()
          Indicates on which EventType an event has to be fired
 EventFiring firingMode()
          Indicates which firing mode to use
 java.lang.Class<CacheEventListenerProvider> getServiceType()
          Indicates which service this configuration works with.
 EventOrdering orderingMode()
          Indicates which ordering mode to use
 void setEventFiringMode(EventFiring firingMode)
          Sets the event firing mode on this configuration object.
 void setEventOrderingMode(EventOrdering orderingMode)
          Sets the event orderign mode on this configuration object.
 
Methods inherited from class org.ehcache.impl.internal.classes.ClassInstanceConfiguration
getArguments, getClazz, getInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultCacheEventListenerConfiguration

public DefaultCacheEventListenerConfiguration(java.util.Set<EventType> fireOn,
                                              java.lang.Class<? extends CacheEventListener<?,?>> clazz,
                                              java.lang.Object... arguments)
Creates a new DefaultCacheEventListenerConfiguration with the provided parameters.

Parameters:
fireOn - the events to fire on
clazz - the cache event listener class
arguments - optional constructor arguments
See Also:
setEventFiringMode(EventFiring), setEventOrderingMode(EventOrdering)

DefaultCacheEventListenerConfiguration

public DefaultCacheEventListenerConfiguration(java.util.Set<EventType> fireOn,
                                              CacheEventListener<?,?> listener)
Creates a new DefaultCacheEventListenerConfiguration with the provided parameters.

Parameters:
fireOn - the events to fire on
listener - the cache event listener instance
See Also:
setEventFiringMode(EventFiring), setEventOrderingMode(EventOrdering)
Method Detail

getServiceType

public java.lang.Class<CacheEventListenerProvider> getServiceType()
Indicates which service this configuration works with.

Specified by:
getServiceType in interface ServiceConfiguration<CacheEventListenerProvider>
Returns:
the service type

setEventFiringMode

public void setEventFiringMode(EventFiring firingMode)
Sets the event firing mode on this configuration object.

Parameters:
firingMode - the event firing mode

setEventOrderingMode

public void setEventOrderingMode(EventOrdering orderingMode)
Sets the event orderign mode on this configuration object.

Parameters:
orderingMode - the event ordering mode

firingMode

public EventFiring firingMode()
Indicates which firing mode to use

Specified by:
firingMode in interface CacheEventListenerConfiguration
Returns:
the firing mode to use

orderingMode

public EventOrdering orderingMode()
Indicates which ordering mode to use

Specified by:
orderingMode in interface CacheEventListenerConfiguration
Returns:
the ordering mode to use

fireOn

public java.util.EnumSet<EventType> fireOn()
Indicates on which EventType an event has to be fired

Specified by:
fireOn in interface CacheEventListenerConfiguration
Returns:
the set of EventType to fire on