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, storeResult
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isAborted, setMethodDescription, storeResult
public 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)
ComponentEvent
matches
in interface ComponentEvent
eventType
- 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)
ComponentEvent
coerceContext
in interface ComponentEvent
index
- the index of the context valuedesiredTypeName
- the desired typepublic Object[] getContext()
ComponentEvent
EventContext
as a (possibly empty) array.getContext
in interface ComponentEvent
public EventContext getEventContext()
ComponentEvent
getEventContext
in interface ComponentEvent
5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.