org.jasig.portal.events.handlers
Class PortalEventMulticaster
java.lang.Object
org.jasig.portal.events.handlers.AbstractLimitedSupportEventHandler
org.jasig.portal.events.handlers.PortalEventMulticaster
- All Implemented Interfaces:
- EventHandler
public class PortalEventMulticaster
- extends AbstractLimitedSupportEventHandler
- Version:
- $Revision$
- Author:
- Eric Dalquist
| Methods inherited from class org.jasig.portal.events.handlers.AbstractLimitedSupportEventHandler |
getIgnoredUserNames, getSupportedEvents, getSupportedUserNames, isExplicitMatching, isRequireAll, isSupportGuest, setExplicitMatching, setIgnoredUserNames, setRequireAll, setSupportedEvents, setSupportedUserNames, setSupportGuest, supports |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PortalEventMulticaster
public PortalEventMulticaster()
setTaskExecutor
public final void setTaskExecutor(TaskExecutor taskExecutor)
- Set the TaskExecutor to execute event handlers with.
Default is a SyncTaskExecutor, executing the handlers synchronously
in the calling thread.
Consider specifying an asynchronous TaskExecutor here to not block the
caller until all handlers have been executed. However, note that asynchronous
execution will not participate in the caller's thread context (class loader,
transaction association) unless the TaskExecutor explicitly supports this.
- See Also:
SyncTaskExecutor,
SimpleAsyncTaskExecutor,
TimerTaskExecutor
getTaskExecutor
public final TaskExecutor getTaskExecutor()
- Return the current TaskExecutor for this multicaster.
setHandlers
public final void setHandlers(Collection<EventHandler> listeners)
- Parameters:
handlers - the handlers to set
addListener
public final void addListener(EventHandler listener)
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Throws:
Exception
handleEvent
public void handleEvent(PortalEvent event)
- Description copied from interface:
EventHandler
- Method to handle any processing of the event that is needed.
- Parameters:
event - the event to handle.
handleEventInternal
protected void handleEventInternal(PortalEvent event,
EventHandler handler)
- sub-classes can override this method to provide different handling for each
PortalEvent and
EventHandler. The default implementation simply calls EventHandler.supports(PortalEvent)
and EventHandler.handleEvent(PortalEvent).
Copyright © 2010 Jasig. All Rights Reserved.