Apache CXF API

org.apache.cxf.event
Interface EventCache


public interface EventCache

Caches all events that do not have a listener associated with them. The events will be stored until the cache limit is reached. After reaching the cache size, events will be discarded using first in, first out semantics.


Method Summary
 void addEvent(Event e)
          Add the Event to the cache.
 java.util.List<Event> flushEvents()
          Flushes the cache of all the Events.
 java.util.List<Event> flushEvents(javax.xml.namespace.QName eventType)
          Flushes the Event from the cache matching the event type.
 java.util.List<Event> flushEvents(java.lang.String namespaceURI)
          Flushes the Events from the cache matching the event type namespace.
 java.util.List<Event> getEvents()
          Returns all the events.
 java.util.List<Event> getEvents(javax.xml.namespace.QName eventType)
          Returns all the events matching the event type.
 java.util.List<Event> getEvents(java.lang.String namespaceURI)
          Returns all the events matching the event type namespace.
 void setCacheSize(int size)
          Sets the cache size.
 

Method Detail

addEvent

void addEvent(Event e)
Add the Event to the cache. If the maximum size of the cache is reached, the first Event added will be removed from the cache(FIFO)

Parameters:
e - The Event to be added to the cache.

flushEvents

java.util.List<Event> flushEvents()
Flushes the cache of all the Events.

Returns:
List Containing the cached Events.

flushEvents

java.util.List<Event> flushEvents(javax.xml.namespace.QName eventType)
Flushes the Event from the cache matching the event type.

Parameters:
eventType - the Event type.
Returns:
List the list of Events matching the event type.

flushEvents

java.util.List<Event> flushEvents(java.lang.String namespaceURI)
Flushes the Events from the cache matching the event type namespace.

Parameters:
namespaceURI - the Event type namespace.
Returns:
List the list of Events matching the event type namespace.

getEvents

java.util.List<Event> getEvents()
Returns all the events. This method doesn't remove the events from the cache.

Returns:
List the list of all events stored in the cache.

getEvents

java.util.List<Event> getEvents(javax.xml.namespace.QName eventType)
Returns all the events matching the event type. This method doesn't remove the events from the cache.

Parameters:
eventType - the Event type.
Returns:
the list of Events matching the event type.

getEvents

java.util.List<Event> getEvents(java.lang.String namespaceURI)
Returns all the events matching the event type namespace. This method doesn't remove the events from the cache.

Parameters:
namespaceURI - the Event type namespace.
Returns:
the list of Events matching the event type namespace.

setCacheSize

void setCacheSize(int size)
Sets the cache size. This method can be used to dynamically change the cache size from the configured size.

Parameters:
size - Indicates the new size of the cache.

Apache CXF API

Apache CXF