接口的使用
cn.taketoday.context.ApplicationListener
使用ApplicationListener的程序包
程序包
说明
Event System
Java 5 annotation for asynchronous method execution.
-
cn.taketoday.context中ApplicationListener的使用
修饰符和类型方法说明static <T> ApplicationListener<PayloadApplicationEvent<T>>ApplicationListener.forPayload(Consumer<T> consumer) Create a newApplicationListenerfor the given payload consumer.参数类型为ApplicationListener的cn.taketoday.context中的方法修饰符和类型方法说明voidConfigurableApplicationContext.addApplicationListener(ApplicationListener<?> listener) Add a new ApplicationListener that will be notified on context events such as context refresh and context shutdown.voidConfigurableApplicationContext.removeApplicationListener(ApplicationListener<?> listener) Remove the given ApplicationListener from this context's set of listeners, assuming it got registered viaConfigurableApplicationContext.addApplicationListener(cn.taketoday.context.ApplicationListener<?>)before. -
cn.taketoday.context.event中ApplicationListener的使用
修饰符和类型接口说明interfaceExtended variant of the standardApplicationListenerinterface, exposing further metadata such as the supported event and source type.interfaceExtended variant of the standardApplicationListenerinterface, exposing further metadata such as the supported event and source type.修饰符和类型类说明classGenericApplicationListeneradapter that delegates the processing of an event to anEventListenerannotated method.classGenericApplicationListeneradapter that determines supported event types through introspecting the generically declared type of the target listener.classApplicationListenerdecorator that filters events from a specified event source, invoking its delegate listener for matchingApplicationEventobjects only.修饰符和类型方法说明DefaultEventListenerFactory.createApplicationListener(String beanName, Class<?> type, Method method) EventListenerFactory.createApplicationListener(String beanName, Class<?> type, Method method) Create anApplicationListenerfor the specified method.返回变量类型为ApplicationListener的类型的cn.taketoday.context.event中的方法修饰符和类型方法说明protected Collection<ApplicationListener<?>>AbstractApplicationEventMulticaster.getApplicationListeners()Return a Collection containing all ApplicationListeners.protected Collection<ApplicationListener<?>>AbstractApplicationEventMulticaster.getApplicationListeners(ApplicationEvent event, cn.taketoday.core.ResolvableType eventType) Return a Collection of ApplicationListeners matching the given event type.修饰符和类型方法说明voidAbstractApplicationEventMulticaster.addApplicationListener(ApplicationListener listener) voidApplicationEventMulticaster.addApplicationListener(ApplicationListener<?> listener) Add a listener to be notified of all events.protected voidSimpleApplicationEventMulticaster.invokeListener(ApplicationListener<?> listener, ApplicationEvent event) Invoke the given listener with the given event.voidAbstractApplicationEventMulticaster.removeApplicationListener(ApplicationListener<?> listener) voidApplicationEventMulticaster.removeApplicationListener(ApplicationListener<?> listener) Remove a listener from the notification list.protected booleanAbstractApplicationEventMulticaster.supportsEvent(ApplicationListener<?> listener, cn.taketoday.core.ResolvableType eventType, Class<?> sourceType) Determine whether the given listener supports the given event.类型变量类型为ApplicationListener的cn.taketoday.context.event中的方法参数修饰符和类型方法说明voidAbstractApplicationEventMulticaster.removeApplicationListeners(Predicate<ApplicationListener<?>> predicate) voidApplicationEventMulticaster.removeApplicationListeners(Predicate<ApplicationListener<?>> predicate) Remove all matching listeners from the set of registeredApplicationListenerinstances (which includes adapter classes such asApplicationListenerMethodAdapter, e.g. for annotatedEventListenermethods).限定符构造器说明Create a new GenericApplicationListener for the given delegate.SourceFilteringListener(Object source, ApplicationListener<?> delegate) Create a SourceFilteringListener for the given event source. -
cn.taketoday.context.support中ApplicationListener的使用
返回变量类型为ApplicationListener的类型的cn.taketoday.context.support中的方法修饰符和类型方法说明AbstractApplicationContext.getApplicationListeners()Return the list of statically specified ApplicationListeners.修饰符和类型方法说明voidAbstractApplicationContext.addApplicationListener(ApplicationListener<?> listener) Add a new ApplicationListener that will be notified on context events such as context refresh and context shutdown.voidAbstractApplicationContext.removeApplicationListener(ApplicationListener<?> listener) -
cn.taketoday.scheduling.annotation中ApplicationListener的使用
修饰符和类型类说明classBean post-processor that registers methods annotated with@Scheduledto be invoked by aTaskScheduleraccording to the "fixedRate", "fixedDelay", or "cron" expression provided via the annotation.