• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java GenericApplicationListenerAdapter类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.springframework.context.event.GenericApplicationListenerAdapter的典型用法代码示例。如果您正苦于以下问题:Java GenericApplicationListenerAdapter类的具体用法?Java GenericApplicationListenerAdapter怎么用?Java GenericApplicationListenerAdapter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

GenericApplicationListenerAdapter类属于org.springframework.context.event包,在下文中一共展示了GenericApplicationListenerAdapter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initDelegate

点赞 2

import org.springframework.context.event.GenericApplicationListenerAdapter; //导入依赖的package包/类
@Override
protected Filter initDelegate(WebApplicationContext wac) throws ServletException {
    Filter filter = super.initDelegate(wac);
    if(!listenerRegistered) {
        ((AbstractApplicationContext) wac).getApplicationListeners().add(new GenericApplicationListenerAdapter(this));
        listenerRegistered = true;
    }
    return filter;
}
 

开发者ID:SungardAS,
项目名称:enhanced-snapshots,
代码行数:10,
代码来源:RefreshingDelegatingFilterProxy.java

示例2: supportsEvent

点赞 2

import org.springframework.context.event.GenericApplicationListenerAdapter; //导入依赖的package包/类
protected boolean supportsEvent(ApplicationListener<?> listener, ResolvableType eventType, Class<?> sourceType) {
    GenericApplicationListener smartListener = (listener instanceof GenericApplicationListener ?
            (GenericApplicationListener) listener : new GenericApplicationListenerAdapter(listener));
    return (smartListener.supportsEventType(eventType) && smartListener.supportsSourceType(sourceType));
}
 

开发者ID:cuba-platform,
项目名称:cuba,
代码行数:6,
代码来源:UiEventsMulticasterImpl.java

示例3: supportsEvent

点赞 1

import org.springframework.context.event.GenericApplicationListenerAdapter; //导入依赖的package包/类
/**
 * Determine whether the given listener supports the given event.
 * <p>
 * The default implementation detects the {@link SmartApplicationListener}
 * interface. In case of a standard {@link ApplicationListener}, a
 * {@link GenericApplicationListenerAdapter} will be used to introspect the
 * generically declared type of the target listener.
 * 
 * @param listener
 *            the target listener to check
 * @param eventType
 *            the event type to check against
 * @param sourceType
 *            the source type to check against
 * @return whether the given listener should be included in the candidates
 *         for the given event type
 */
protected boolean supportsEvent(ApplicationListener listener, Class<? extends ApplicationEvent> eventType,
        Class sourceType)
{

    SmartApplicationListener smartListener = (listener instanceof SmartApplicationListener ? (SmartApplicationListener) listener
            : new GenericApplicationListenerAdapter(listener));
    return (smartListener.supportsEventType(eventType) && smartListener.supportsSourceType(sourceType));
}
 

开发者ID:Alfresco,
项目名称:alfresco-repository,
代码行数:26,
代码来源:SafeApplicationEventMulticaster.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)