Package | Description |
---|---|
org.springframework.context |
This package builds on the beans package to add support for
message sources and for the Observer design pattern, and the
ability for application objects to obtain resources using a
consistent API.
|
org.springframework.context.event |
Support classes for application events, like standard context events.
|
org.springframework.context.support |
Classes supporting the org.springframework.context package,
such as abstract base classes for ApplicationContext
implementations and a MessageSource implementation.
|
org.springframework.messaging.simp.broker |
Provides a "simple" message broker implementation along with an abstract base
class and other supporting types such as a registry for subscriptions.
|
org.springframework.messaging.simp.user |
Support for handling messages to "user" destinations (i.e.
|
org.springframework.test.context |
This package contains the Spring TestContext Framework which
provides annotation-driven unit and integration testing support that is
agnostic of the actual testing framework in use.
|
org.springframework.test.context.event |
Test event support classes for the Spring TestContext Framework.
|
org.springframework.transaction.event |
Spring's support for listening to transaction events.
|
org.springframework.web.context.support |
Classes supporting the
org.springframework.web.context package,
such as WebApplicationContext implementations and various utility classes. |
org.springframework.web.socket.messaging |
WebSocket integration for Spring's messaging module.
|
Modifier and Type | Interface and Description |
---|---|
interface |
ApplicationListener<E extends ApplicationEvent>
Interface to be implemented by application event listeners.
|
Modifier and Type | Class and Description |
---|---|
class |
PayloadApplicationEvent<T>
An
ApplicationEvent that carries an arbitrary payload. |
Modifier and Type | Method and Description |
---|---|
default void |
ApplicationEventPublisher.publishEvent(ApplicationEvent event)
Notify all matching listeners registered with this
application of an application event.
|
Modifier and Type | Class and Description |
---|---|
class |
ApplicationContextEvent
Base class for events raised for an
ApplicationContext . |
class |
ContextClosedEvent
Event raised when an
ApplicationContext gets closed. |
class |
ContextRefreshedEvent
Event raised when an
ApplicationContext gets initialized or refreshed. |
class |
ContextStartedEvent
Event raised when an
ApplicationContext gets started. |
class |
ContextStoppedEvent
Event raised when an
ApplicationContext gets stopped. |
Modifier and Type | Method and Description |
---|---|
protected Collection<ApplicationListener<?>> |
AbstractApplicationEventMulticaster.getApplicationListeners(ApplicationEvent event,
ResolvableType eventType)
Return a Collection of ApplicationListeners matching the given
event type.
|
protected void |
SimpleApplicationEventMulticaster.invokeListener(ApplicationListener<?> listener,
ApplicationEvent event)
Invoke the given listener with the given event.
|
void |
ApplicationEventMulticaster.multicastEvent(ApplicationEvent event)
Multicast the given application event to appropriate listeners.
|
void |
SimpleApplicationEventMulticaster.multicastEvent(ApplicationEvent event) |
void |
ApplicationEventMulticaster.multicastEvent(ApplicationEvent event,
ResolvableType eventType)
Multicast the given application event to appropriate listeners.
|
void |
SimpleApplicationEventMulticaster.multicastEvent(ApplicationEvent event,
ResolvableType eventType) |
void |
GenericApplicationListenerAdapter.onApplicationEvent(ApplicationEvent event) |
void |
ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationEvent event) |
void |
SourceFilteringListener.onApplicationEvent(ApplicationEvent event) |
protected void |
SourceFilteringListener.onApplicationEventInternal(ApplicationEvent event)
Actually process the event, after having filtered according to the
desired event source already.
|
void |
ApplicationListenerMethodAdapter.processEvent(ApplicationEvent event)
Process the specified
ApplicationEvent , checking if the condition
matches and handling a non-null result, if any. |
protected Object[] |
ApplicationListenerMethodAdapter.resolveArguments(ApplicationEvent event)
Resolve the method arguments to use for the specified
ApplicationEvent . |
Modifier and Type | Method and Description |
---|---|
boolean |
SmartApplicationListener.supportsEventType(Class<? extends ApplicationEvent> eventType)
Determine whether this listener actually supports the given event type.
|
default boolean |
GenericApplicationListener.supportsEventType(Class<? extends ApplicationEvent> eventType)
Overrides
SmartApplicationListener.supportsEventType(Class) with
delegation to GenericApplicationListener.supportsEventType(ResolvableType) . |
Modifier and Type | Method and Description |
---|---|
void |
AbstractApplicationContext.publishEvent(ApplicationEvent event)
Publish the given event to all listeners.
|
Modifier and Type | Class and Description |
---|---|
class |
BrokerAvailabilityEvent
Event raised when a broker's availability changes.
|
Modifier and Type | Method and Description |
---|---|
void |
MultiServerUserRegistry.onApplicationEvent(ApplicationEvent event) |
Modifier and Type | Method and Description |
---|---|
boolean |
MultiServerUserRegistry.supportsEventType(Class<? extends ApplicationEvent> eventType) |
Modifier and Type | Method and Description |
---|---|
default void |
TestContext.publishEvent(Function<TestContext,? extends ApplicationEvent> eventFactory)
Publish the
ApplicationEvent created by the given eventFactory
to the application context for this
test context. |
Modifier and Type | Method and Description |
---|---|
Stream<ApplicationEvent> |
ApplicationEvents.stream()
Stream all application events that were fired during test execution.
|
Modifier and Type | Interface and Description |
---|---|
interface |
TransactionalApplicationListener<E extends ApplicationEvent>
An
ApplicationListener that is invoked according to a TransactionPhase . |
class |
TransactionalApplicationListenerAdapter<E extends ApplicationEvent>
TransactionalApplicationListener adapter that delegates the processing of
an event to a target ApplicationListener instance. |
Modifier and Type | Method and Description |
---|---|
void |
TransactionalApplicationListenerMethodAdapter.onApplicationEvent(ApplicationEvent event) |
default void |
TransactionalApplicationListener.SynchronizationCallback.postProcessEvent(ApplicationEvent event,
Throwable ex)
Called after a transactional event listener invocation.
|
default void |
TransactionalApplicationListener.SynchronizationCallback.preProcessEvent(ApplicationEvent event)
Called before transactional event listener invocation.
|
Modifier and Type | Class and Description |
---|---|
class |
RequestHandledEvent
Event raised when a request is handled within an ApplicationContext.
|
class |
ServletRequestHandledEvent
Servlet-specific subclass of RequestHandledEvent,
adding servlet-specific context information.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractSubProtocolEvent
A base class for events for a message received from a WebSocket client and
parsed into a higher-level sub-protocol (e.g.
|
class |
SessionConnectedEvent
A connected event represents the server response to a client's connect request.
|
class |
SessionConnectEvent
Event raised when a new WebSocket client using a Simple Messaging Protocol
(e.g.
|
class |
SessionDisconnectEvent
Event raised when the session of a WebSocket client using a Simple Messaging
Protocol (e.g.
|
class |
SessionSubscribeEvent
Event raised when a new WebSocket client using a Simple Messaging Protocol
(e.g.
|
class |
SessionUnsubscribeEvent
Event raised when a new WebSocket client using a Simple Messaging Protocol
(e.g.
|
Modifier and Type | Method and Description |
---|---|
void |
DefaultSimpUserRegistry.onApplicationEvent(ApplicationEvent event) |
Modifier and Type | Method and Description |
---|---|
boolean |
DefaultSimpUserRegistry.supportsEventType(Class<? extends ApplicationEvent> eventType) |