Package org.dspace.services.model
Interface EventListener
-
- All Known Implementing Classes:
EventListenerExample
public interface EventListener
These will be triggered when specific events occur in the system.- Author:
- Aaron Zeckoski (azeckoski @ gmail.com)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]
getEventNamePrefixes()
This defines the events that you want to know about by event name.String
getResourcePrefix()
This defines the events that you want to know about by event resource (reference).void
receiveEvent(Event event)
Called when an event occurs which passes through the filters created bygetEventNamePrefixes()
andgetResourcePrefix()
.
-
-
-
Method Detail
-
getEventNamePrefixes
String[] getEventNamePrefixes()
This defines the events that you want to know about by event name.receiveEvent(Event)
will be called whenever an event occurs which has a name that begins with any of the strings this method returns. Simply return an empty array if you do not want to match events this way.Note: Can be used with
getResourcePrefix()
.- Returns:
- an arrays of event name prefixes
-
getResourcePrefix
String getResourcePrefix()
This defines the events that you want to know about by event resource (reference).receiveEvent(Event)
will be called whenever an event occurs which has a resource that begins with the string this method returns. Simply return an empty string to match no events this way.Note: Can be used with
getEventNamePrefixes()
.- Returns:
- a string with a resource (reference) prefix
-
receiveEvent
void receiveEvent(Event event)
Called when an event occurs which passes through the filters created bygetEventNamePrefixes()
andgetResourcePrefix()
.- Parameters:
event
- includes all the information related to the event that occurred
-
-