Top Fields Constructors Methods
com.sun.faces.application.applicationimpl

public Class Events

extends Object
Class Inheritance
Static Imports
com.sun.faces.util.Util.notNull, java.util.logging.Level.WARNING, javax.faces.application.ProjectStage.Development

Field Summary

Modifier and TypeField and Description
private final ComponentSystemEventHelper
private static final String
private static final String
private ReentrantLisneterInvocationGuard
private static final Logger
private static final String
private static final String
private final SystemEventHelper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private SystemEventListener[]
private Set<SystemEventListener>

Returns:

the SystemEventListeners that should be used for the provided combination of SystemEvent and source.
getListeners
(Class<? extends SystemEvent> systemEvent, Class<?> sourceClass)

private SystemEvent

Returns:

process any listeners for the specified SystemEventListenerHolder and return any SystemEvent that may have been created as a side-effect of processing the listeners.
invokeComponentListenersFor
(Class<? extends SystemEvent> systemEventClass, Object source)

private SystemEvent
invokeListenersFor(Class<? extends SystemEvent> systemEventClass, SystemEvent event, Object source, Class<?> sourceBaseType, boolean useSourceLookup)

Traverse the List of listeners and invoke any that are relevent for the specified source.

private SystemEvent
invokeViewListenersFor(FacesContext ctx, Class<? extends SystemEvent> systemEventClass, SystemEvent event, Object source)

private boolean
needsProcessing(FacesContext context, Class<? extends SystemEvent> systemEventClass)

private boolean
private SystemEvent
processListeners(Collection<SystemEventListener> listeners, SystemEvent event, Object source, EventInfo eventInfo)

Iterate through and invoke the listeners.

private SystemEvent
public void
publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Object source, ProjectStage projectStage)

public void
publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source, ProjectStage projectStage)

public void
subscribeToEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)

public void
subscribeToEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)

public void
unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

compSysEventHelperback to summary
private final ComponentSystemEventHelper compSysEventHelper
CONTEXTback to summary
private static final String CONTEXT
LISTENERback to summary
private static final String LISTENER
listenerInvocationGuardback to summary
private ReentrantLisneterInvocationGuard listenerInvocationGuard
LOGGERback to summary
private static final Logger LOGGER
SOURCEback to summary
private static final String SOURCE
SYSTEM_EVENT_CLASSback to summary
private static final String SYSTEM_EVENT_CLASS
systemEventHelperback to summary
private final SystemEventHelper systemEventHelper

Constructor Detail

Eventsback to summary
public Events()

Method Detail

copyListWithExclusionsback to summary
private SystemEventListener[] copyListWithExclusions(Collection<SystemEventListener> original, Map<SystemEventListener, Boolean> excludes)
getListenersback to summary
private Set<SystemEventListener> getListeners(Class<? extends SystemEvent> systemEvent, Class<?> sourceClass)
Returns:Set<SystemEventListener>

the SystemEventListeners that should be used for the provided combination of SystemEvent and source.

invokeComponentListenersForback to summary
private SystemEvent invokeComponentListenersFor(Class<? extends SystemEvent> systemEventClass, Object source)
Returns:SystemEvent

process any listeners for the specified SystemEventListenerHolder and return any SystemEvent that may have been created as a side-effect of processing the listeners.

invokeListenersForback to summary
private SystemEvent invokeListenersFor(Class<? extends SystemEvent> systemEventClass, SystemEvent event, Object source, Class<?> sourceBaseType, boolean useSourceLookup) throws AbortProcessingException

Traverse the List of listeners and invoke any that are relevent for the specified source.

Exceptions
AbortProcessingException:
propagated from the listener invocation
invokeViewListenersForback to summary
private SystemEvent invokeViewListenersFor(FacesContext ctx, Class<? extends SystemEvent> systemEventClass, SystemEvent event, Object source)
needsProcessingback to summary
private boolean needsProcessing(FacesContext context, Class<? extends SystemEvent> systemEventClass)
originalDiffersFromCopyback to summary
private boolean originalDiffersFromCopy(Collection<SystemEventListener> original, SystemEventListener[] copy)
processListenersback to summary
private SystemEvent processListeners(Collection<SystemEventListener> listeners, SystemEvent event, Object source, EventInfo eventInfo)

Iterate through and invoke the listeners. If the passed event was null, create the event, and return it.

processListenersAccountingForAddsback to summary
private SystemEvent processListenersAccountingForAdds(List<SystemEventListener> listeners, SystemEvent event, Object source, EventInfo eventInfo)
publishEventback to summary
public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Object source, ProjectStage projectStage)
See Also
javax.faces.application.Application#publishEvent(FacesContext, Class, Object)
publishEventback to summary
public void publishEvent(FacesContext context, Class<? extends SystemEvent> systemEventClass, Class<?> sourceBaseType, Object source, ProjectStage projectStage)
See Also
javax.faces.application.Application#publishEvent(FacesContext, Class, Object)
subscribeToEventback to summary
public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, SystemEventListener listener)
See Also
Application#subscribeToEvent(Class, javax.faces.event.SystemEventListener)
subscribeToEventback to summary
public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)
See Also
Application#subscribeToEvent(Class, Class, javax.faces.event.SystemEventListener)
unsubscribeFromEventback to summary
public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass, Class<?> sourceClass, SystemEventListener listener)
See Also
Application#unsubscribeFromEvent(Class, Class, javax.faces.event.SystemEventListener)