01: /*
02: * Copyright 2005 The JA-SIG Collaborative. All rights reserved. See license
03: * distributed with this file and available online at
04: * http://www.uportal.org/license.html
05: */
06: package org.jasig.portal.events;
07:
08: /**
09: * Interface of classes that know how to handle a specific event. The concept of
10: * handling an event usually implies that the handler will perform some form of
11: * logging such as using Log4j or writing the information to a database.
12: *
13: * @author Scott Battaglia
14: * @version $Revision: 36546 $ $Date: 2006-04-11 12:18:23 -0700 (Tue, 11 Apr 2006) $
15: * @since 3.0
16: */
17: public interface EventHandler {
18:
19: /**
20: * Method to handle any processing of the event that is needed.
21: *
22: * @param event the event to handle.
23: */
24: void handleEvent(PortalEvent event);
25:
26: /**
27: * Method to check if this handler will be able to process the event.
28: *
29: * @param event the event we want to check if we support.
30: * @return true if the event is supported, false otherwise.
31: */
32: boolean supports(PortalEvent event);
33: }
|