类的使用
org.springframework.context.ApplicationEvent
使用ApplicationEvent的程序包 程序包 说明 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. destinations that are unique to a user's sessions), primarily translating the destinations and then forwarding the updated message to the broker.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.web.context.support Classes supporting theorg.springframework.web.contextpackage, such as WebApplicationContext implementations and various utility classes.org.springframework.web.socket.messaging WebSocket integration for Spring's messaging module.org.springframework.context中ApplicationEvent的使用
类型参数类型为ApplicationEvent的org.springframework.context中的类 修饰符和类型 接口 说明 interfaceApplicationListener<E extends ApplicationEvent>Interface to be implemented by application event listeners.org.springframework.context中ApplicationEvent的子类 修饰符和类型 类 说明 classPayloadApplicationEvent<T>AnApplicationEventthat carries an arbitrary payload.参数类型为ApplicationEvent的org.springframework.context中的方法 修饰符和类型 方法 说明 default voidApplicationEventPublisher. publishEvent(ApplicationEvent event)Notify all matching listeners registered with this application of an application event.org.springframework.context.event中ApplicationEvent的使用
org.springframework.context.event中ApplicationEvent的子类 修饰符和类型 类 说明 classApplicationContextEventBase class for events raised for anApplicationContext.classContextClosedEventEvent raised when anApplicationContextgets closed.classContextRefreshedEventEvent raised when anApplicationContextgets initialized or refreshed.classContextStartedEventEvent raised when anApplicationContextgets started.classContextStoppedEventEvent raised when anApplicationContextgets stopped.参数类型为ApplicationEvent的org.springframework.context.event中的方法 修饰符和类型 方法 说明 protected Collection<ApplicationListener<?>>AbstractApplicationEventMulticaster. getApplicationListeners(ApplicationEvent event, ResolvableType eventType)Return a Collection of ApplicationListeners matching the given event type.protected voidSimpleApplicationEventMulticaster. invokeListener(ApplicationListener<?> listener, ApplicationEvent event)Invoke the given listener with the given event.voidApplicationEventMulticaster. multicastEvent(ApplicationEvent event)Multicast the given application event to appropriate listeners.voidApplicationEventMulticaster. multicastEvent(ApplicationEvent event, ResolvableType eventType)Multicast the given application event to appropriate listeners.voidSimpleApplicationEventMulticaster. multicastEvent(ApplicationEvent event)voidSimpleApplicationEventMulticaster. multicastEvent(ApplicationEvent event, ResolvableType eventType)voidApplicationListenerMethodAdapter. onApplicationEvent(ApplicationEvent event)voidGenericApplicationListenerAdapter. onApplicationEvent(ApplicationEvent event)voidSourceFilteringListener. onApplicationEvent(ApplicationEvent event)protected voidSourceFilteringListener. onApplicationEventInternal(ApplicationEvent event)Actually process the event, after having filtered according to the desired event source already.voidApplicationListenerMethodAdapter. processEvent(ApplicationEvent event)Process the specifiedApplicationEvent, 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 specifiedApplicationEvent.类型变量类型为ApplicationEvent的org.springframework.context.event中的方法参数 修饰符和类型 方法 说明 booleanGenericApplicationListenerAdapter. supportsEventType(Class<? extends ApplicationEvent> eventType)booleanSmartApplicationListener. supportsEventType(Class<? extends ApplicationEvent> eventType)Determine whether this listener actually supports the given event type.booleanSourceFilteringListener. supportsEventType(Class<? extends ApplicationEvent> eventType)org.springframework.context.support中ApplicationEvent的使用
参数类型为ApplicationEvent的org.springframework.context.support中的方法 修饰符和类型 方法 说明 voidAbstractApplicationContext. publishEvent(ApplicationEvent event)Publish the given event to all listeners.org.springframework.messaging.simp.broker中ApplicationEvent的使用
org.springframework.messaging.simp.broker中ApplicationEvent的子类 修饰符和类型 类 说明 classBrokerAvailabilityEventEvent raised when a broker's availability changes.org.springframework.messaging.simp.user中ApplicationEvent的使用
参数类型为ApplicationEvent的org.springframework.messaging.simp.user中的方法 修饰符和类型 方法 说明 voidMultiServerUserRegistry. onApplicationEvent(ApplicationEvent event)类型变量类型为ApplicationEvent的org.springframework.messaging.simp.user中的方法参数 修饰符和类型 方法 说明 booleanMultiServerUserRegistry. supportsEventType(Class<? extends ApplicationEvent> eventType)org.springframework.test.context中ApplicationEvent的使用
类型变量类型为ApplicationEvent的org.springframework.test.context中的方法参数 修饰符和类型 方法 说明 default voidTestContext. publishEvent(Function<TestContext,? extends ApplicationEvent> eventFactory)Publish theApplicationEventcreated by the giveneventFactoryto the application context for this test context.org.springframework.test.context.event中ApplicationEvent的使用
org.springframework.web.context.support中ApplicationEvent的使用
org.springframework.web.context.support中ApplicationEvent的子类 修饰符和类型 类 说明 classRequestHandledEventEvent raised when a request is handled within an ApplicationContext.classServletRequestHandledEventServlet-specific subclass of RequestHandledEvent, adding servlet-specific context information.org.springframework.web.socket.messaging中ApplicationEvent的使用
org.springframework.web.socket.messaging中ApplicationEvent的子类 修饰符和类型 类 说明 classAbstractSubProtocolEventA base class for events for a message received from a WebSocket client and parsed into a higher-level sub-protocol (e.g.classSessionConnectedEventA connected event represents the server response to a client's connect request.classSessionConnectEventEvent raised when a new WebSocket client using a Simple Messaging Protocol (e.g.classSessionDisconnectEventEvent raised when the session of a WebSocket client using a Simple Messaging Protocol (e.g.classSessionSubscribeEventEvent raised when a new WebSocket client using a Simple Messaging Protocol (e.g.classSessionUnsubscribeEventEvent raised when a new WebSocket client using a Simple Messaging Protocol (e.g.参数类型为ApplicationEvent的org.springframework.web.socket.messaging中的方法 修饰符和类型 方法 说明 voidDefaultSimpUserRegistry. onApplicationEvent(ApplicationEvent event)类型变量类型为ApplicationEvent的org.springframework.web.socket.messaging中的方法参数 修饰符和类型 方法 说明 booleanDefaultSimpUserRegistry. supportsEventType(Class<? extends ApplicationEvent> eventType)