public class ComponentEventImpl extends EventImpl implements ComponentEvent
| Constructor and Description |
|---|
ComponentEventImpl(String eventType,
String originatingComponentId,
EventContext context,
ComponentEventCallback handler,
ComponentPageElementResources elementResources,
boolean exactParameterCountMatch,
ComponentModel model,
org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
Object |
coerceContext(int index,
String desiredTypeName)
Coerces a context value to a particular type.
|
Object[] |
getContext()
Returns the underlying
EventContext as a (possibly empty) array. |
EventContext |
getEventContext()
Returns the underlying event context.
|
boolean |
matches(String eventType,
String componentId,
int parameterCount)
Returns true if the event matches the provided criteria and the event has not yet been aborted.
|
String |
toString() |
getMethodDescription, isAborted, setMethodDescription, storeResultclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitisAborted, setMethodDescription, storeResultpublic ComponentEventImpl(String eventType, String originatingComponentId, EventContext context, ComponentEventCallback handler, ComponentPageElementResources elementResources, boolean exactParameterCountMatch, ComponentModel model, org.slf4j.Logger logger)
eventType - non blank string used to identify the type of event that was triggeredoriginatingComponentId - the id of the component that triggered the eventcontext - provides access to parameter valueshandler - invoked when a non-null return value is obtained from an event handler methodelementResources - provides access to common resources and servicesexactParameterCountMatch - the Symbol indicating an exact match
on parameter count in the EventContext.model - the ComponentModel of the component originating the event.logger - used to log method invocationspublic boolean matches(String eventType, String componentId, int parameterCount)
ComponentEventmatches in interface ComponentEventeventType - the type of event (case insensitive match)componentId - component is to match against (case insensitive), or the empty stringparameterCount - minimum number of context valuespublic Object coerceContext(int index, String desiredTypeName)
ComponentEventcoerceContext in interface ComponentEventindex - the index of the context valuedesiredTypeName - the desired typepublic Object[] getContext()
ComponentEventEventContext as a (possibly empty) array.getContext in interface ComponentEventpublic EventContext getEventContext()
ComponentEventgetEventContext in interface ComponentEvent5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.