Spring Framework DelegatingIntroductionInterceptor - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework DelegatingIntroductionInterceptor class.

This code example shows how to use the following methods:
/** 
 * 
 * @author Rod Johnson 
 */ 
@SuppressWarnings("serial") 
public class TimestampIntroductionAdvisor extends DefaultIntroductionAdvisor { 
 
	/** 
	 * @param dii 
	 */ 
	public TimestampIntroductionAdvisor() { 
		super(new DelegatingIntroductionInterceptor(new TimestampIntroductionInterceptor())); 
	} 
 
} 
6
CodeRank
This code example shows how to use the following methods:
public class TimestampIntroductionInterceptor extends DelegatingIntroductionInterceptor 
		implements TimeStamped { 
 
	private long ts; 
 
	public TimestampIntroductionInterceptor() { 
	} 
 
	public TimestampIntroductionInterceptor(long ts) { 
		this.ts = ts; 
	} 
 
	public void setTime(long ts) { 
		this.ts = ts; 
	} 
 
	@Override 
	public long getTimeStamp() { 
		return ts; 
	} 
6
CodeRank
This code example shows how to use the following methods:invoke
	 */ 
	@Override 
	public Object invoke(MethodInvocation invocation) throws Throwable { 
		if (locked() && invocation.getMethod().getName().indexOf("set") == 0) 
			throw new LockedException(); 
		return super.invoke(invocation); 
	} 
 
} 
6
CodeRank
This code example shows how to use the following methods:
	/** 
	 * Return an IntroductionAdvisor that providing a mixin 
	 * exposing statistics about the pool maintained by this object. 
	 */ 
	public DefaultIntroductionAdvisor getPoolingConfigMixin() { 
		DelegatingIntroductionInterceptor dii = new DelegatingIntroductionInterceptor(this); 
		return new DefaultIntroductionAdvisor(dii, PoolingConfig.class); 
	} 
 
} 
5
CodeRank
This code example shows how to use the following methods:
	/** 
	 * Return an introduction advisor mixin that allows the AOP proxy to be 
	 * cast to ThreadLocalInvokerStats. 
	 */ 
	public IntroductionAdvisor getStatsMixin() { 
		DelegatingIntroductionInterceptor dii = new DelegatingIntroductionInterceptor(this); 
		return new DefaultIntroductionAdvisor(dii, ThreadLocalTargetSourceStats.class); 
	} 
 
} 
5
CodeRank
This code example shows how to use the following methods:
package org.mifos.platform.persistence; 
 
import org.aopalliance.intercept.MethodInvocation; 
import org.springframework.aop.support.DelegatingIntroductionInterceptor; 
 
public class QueryIntroductionInterceptor extends DelegatingIntroductionInterceptor { 
 
    private static final long serialVersionUID = 1L; 
    @Override 
    @SuppressWarnings("PMD.OnlyOneReturn") 
    public Object invoke(MethodInvocation mi) throws Throwable { 
        if (mi.getThis() instanceof QueryExecutor) { 
            QueryExecutor qryExec = (QueryExecutor) mi.getThis(); 
            String methodName = mi.getMethod().getName(); 
            //TODO: introduce a @InceptFindQuery, @noInterceptFindQuery() annotation, and check with mi.getMethod().getAnnotations()?? 
            if(methodName.startsWith("retrieve")) { 
                Object[] arguments = mi.getArguments(); 
                //mi.getMethod().getGenericReturnType() 
                //TODO check if return type is of collection or not. and return accordingly 
                return qryExec.execFindQuery(methodName, arguments); 
5
CodeRank
This code example shows how to use the following methods:
 *  
 *  
 * @author Costin Leau 
 * 
 */ 
public class EntryMixin extends DelegatingIntroductionInterceptor implements Entry { 
 
} 
5
CodeRank
This code example shows how to use the following methods:
        private final long cutOffAfterTimeMs;
        private final int cutOffAfterCount;
         
        private PermissionCheckCollectionMixin(int targetResultCount, long cutOffAfterTimeMs, int cutOffAfterCount)
        { 
            super(); 
            this.targetResultCount = targetResultCount;
            this.cutOffAfterTimeMs = cutOffAfterTimeMs;
            this.cutOffAfterCount = cutOffAfterCount;
            if (cutOffAfterTimeMs <= 0)
            { 
                cutOffAfterTimeMs = 0;
            } 
            if (cutOffAfterCount <= 0)
            { 
                cutOffAfterCount = 0;
            } 
        } 
 
        @Override 
4
CodeRank
This code example shows how to use the following methods:
    @SuppressWarnings("serial") 
    public static class PermissionCheckedValueMixin extends DelegatingIntroductionInterceptor implements PermissionCheckedValue
    { 
        private PermissionCheckedValueMixin() 
        { 
            super(); 
        } 
        /** 
         * Helper method to create a {@link PermissionCheckedValue} from an existing <code>Object</code>. 
         *  
         * @param collection        the <code>Object</code> to proxy 
         * @return                  a <code>Object</code> of the same type but including the 
         *                          {@link PermissionCheckedValue} interface 
         */ 
        @SuppressWarnings("unchecked") 
        public static final <T extends Object> T create(T object)
        { 
            // Create the mixin 
            DelegatingIntroductionInterceptor mixin = new PermissionCheckedValueMixin();
            // Create the advisor 
4
CodeRank
See Code Examples for Spring Framework DelegatingIntroductionInterceptor Methods: