当前位置: 首页>>代码示例>>Java>>正文


Java DelegatingIntroductionInterceptor.suppressInterface方法代码示例

本文整理汇总了Java中org.springframework.aop.support.DelegatingIntroductionInterceptor.suppressInterface方法的典型用法代码示例。如果您正苦于以下问题:Java DelegatingIntroductionInterceptor.suppressInterface方法的具体用法?Java DelegatingIntroductionInterceptor.suppressInterface怎么用?Java DelegatingIntroductionInterceptor.suppressInterface使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.aop.support.DelegatingIntroductionInterceptor的用法示例。


在下文中一共展示了DelegatingIntroductionInterceptor.suppressInterface方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createRefreshableProxy

import org.springframework.aop.support.DelegatingIntroductionInterceptor; //导入方法依赖的package包/类
/**
 * Create a refreshable proxy for the given AOP TargetSource.
 * @param ts the refreshable TargetSource
 * @param interfaces the proxy interfaces (may be {@code null} to
 * indicate proxying of all interfaces implemented by the target class)
 * @return the generated proxy
 * @see RefreshableScriptTargetSource
 */
protected Object createRefreshableProxy(TargetSource ts, Class<?>[] interfaces, boolean proxyTargetClass) {
	ProxyFactory proxyFactory = new ProxyFactory();
	proxyFactory.setTargetSource(ts);
	ClassLoader classLoader = this.beanClassLoader;

	if (interfaces == null) {
		interfaces = ClassUtils.getAllInterfacesForClass(ts.getTargetClass(), this.beanClassLoader);
	}
	proxyFactory.setInterfaces(interfaces);
	if (proxyTargetClass) {
		classLoader = null;  // force use of Class.getClassLoader()
		proxyFactory.setProxyTargetClass(proxyTargetClass);
	}

	DelegatingIntroductionInterceptor introduction = new DelegatingIntroductionInterceptor(ts);
	introduction.suppressInterface(TargetSource.class);
	proxyFactory.addAdvice(introduction);

	return proxyFactory.getProxy(classLoader);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:29,代码来源:ScriptFactoryPostProcessor.java

示例2: createRefreshableProxy

import org.springframework.aop.support.DelegatingIntroductionInterceptor; //导入方法依赖的package包/类
/**
    * Create a refreshable proxy for the given AOP TargetSource.
    * 
    * @param ts
    *            the refreshable TargetSource
    * @param interfaces
    *            the proxy interfaces (may be {@code null} to indicate proxying
    *            of all interfaces implemented by the target class)
    * @return the generated proxy
    * @see RefreshableScriptTargetSource
    */
   protected Object createRefreshableProxy(TargetSource ts, Class<?>[] interfaces, boolean proxyTargetClass) {
ProxyFactory proxyFactory = new ProxyFactory();
proxyFactory.setTargetSource(ts);
ClassLoader classLoader = this.beanClassLoader;

if (interfaces == null) {
    interfaces = ClassUtils.getAllInterfacesForClass(ts.getTargetClass(), this.beanClassLoader);
}
proxyFactory.setInterfaces(interfaces);
if (proxyTargetClass) {
    classLoader = null; // force use of Class.getClassLoader()
    proxyFactory.setProxyTargetClass(true);
}

DelegatingIntroductionInterceptor introduction = new DelegatingIntroductionInterceptor(ts);
introduction.suppressInterface(TargetSource.class);
proxyFactory.addAdvice(introduction);

return proxyFactory.getProxy(classLoader);
   }
 
开发者ID:ilivoo,项目名称:game,代码行数:32,代码来源:MyScriptFactoryPostProcessor.java

示例3: createRefreshableProxy

import org.springframework.aop.support.DelegatingIntroductionInterceptor; //导入方法依赖的package包/类
/**
 * Create a refreshable proxy for the given AOP TargetSource.
 * @param ts the refreshable TargetSource
 * @param interfaces the proxy interfaces (may be {@code null} to
 * indicate proxying of all interfaces implemented by the target class)
 * @return the generated proxy
 * @see RefreshableScriptTargetSource
 */
protected Object createRefreshableProxy(TargetSource ts, Class<?>[] interfaces, boolean proxyTargetClass) {
	ProxyFactory proxyFactory = new ProxyFactory();
	proxyFactory.setTargetSource(ts);
	ClassLoader classLoader = this.beanClassLoader;

	if (interfaces == null) {
		interfaces = ClassUtils.getAllInterfacesForClass(ts.getTargetClass(), this.beanClassLoader);
	}
	proxyFactory.setInterfaces(interfaces);
	if (proxyTargetClass) {
		classLoader = null;  // force use of Class.getClassLoader()
		proxyFactory.setProxyTargetClass(true);
	}

	DelegatingIntroductionInterceptor introduction = new DelegatingIntroductionInterceptor(ts);
	introduction.suppressInterface(TargetSource.class);
	proxyFactory.addAdvice(introduction);

	return proxyFactory.getProxy(classLoader);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:29,代码来源:ScriptFactoryPostProcessor.java

示例4: createEndpoint

import org.springframework.aop.support.DelegatingIntroductionInterceptor; //导入方法依赖的package包/类
/**
 * Wrap each concrete endpoint instance with an AOP proxy,
 * exposing the message listener's interfaces as well as the
 * endpoint SPI through an AOP introduction.
 */
@Override
public MessageEndpoint createEndpoint(XAResource xaResource) throws UnavailableException {
	GenericMessageEndpoint endpoint = (GenericMessageEndpoint) super.createEndpoint(xaResource);
	ProxyFactory proxyFactory = new ProxyFactory(this.messageListener);
	DelegatingIntroductionInterceptor introduction = new DelegatingIntroductionInterceptor(endpoint);
	introduction.suppressInterface(MethodInterceptor.class);
	proxyFactory.addAdvice(introduction);
	return (MessageEndpoint) proxyFactory.getProxy();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:GenericMessageEndpointFactory.java

示例5: createProxyFactory

import org.springframework.aop.support.DelegatingIntroductionInterceptor; //导入方法依赖的package包/类
private void createProxyFactory(RefreshableScriptTargetSource ts, 
		Class<?>[] interfaces, ClassLoader loader) {
	ProxyFactory proxyFactory = new ProxyFactory();
	proxyFactory.setTargetSource(ts);
	proxyFactory.setInterfaces(interfaces);
	DelegatingIntroductionInterceptor introduction = new DelegatingIntroductionInterceptor(ts);
	introduction.suppressInterface(TargetSource.class);
	proxyFactory.addAdvice(introduction);
	proxyFactory.getProxy(loader);
	
}
 
开发者ID:valliappanr,项目名称:refreshable-beans,代码行数:12,代码来源:SpringContextWrapper.java


注:本文中的org.springframework.aop.support.DelegatingIntroductionInterceptor.suppressInterface方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。