spring-framework / org.springframework.context.event / EventPublicationInterceptor / setApplicationEventClass

setApplicationEventClass

open fun setApplicationEventClass(applicationEventClass: Class<*>): Unit

Set the application event class to publish.

The event class must have a constructor with a single Object argument for the event source. The interceptor will pass in the invoked object.

Exceptions

IllegalArgumentException - if the supplied Class is null or if it is not an ApplicationEvent subclass or if it does not expose a constructor that takes a single Object argument