org.aopalliance.intercept.Interceptor Java Examples

The following examples show how to use org.aopalliance.intercept.Interceptor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProxyFactory.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Create a new ProxyFactory for the given interface and interceptor.
 * <p>Convenience method for creating a proxy for a single interceptor,
 * assuming that the interceptor handles all calls itself rather than
 * delegating to a target, like in the case of remoting proxies.
 * @param proxyInterface the interface that the proxy should implement
 * @param interceptor the interceptor that the proxy should invoke
 */
public ProxyFactory(Class<?> proxyInterface, Interceptor interceptor) {
	addInterface(proxyInterface);
	addAdvice(interceptor);
}
 
Example #2
Source File: ProxyFactory.java    From spring-analysis-note with MIT License 2 votes vote down vote up
/**
 * Create a new proxy for the given interface and interceptor.
 * <p>Convenience method for creating a proxy for a single interceptor,
 * assuming that the interceptor handles all calls itself rather than
 * delegating to a target, like in the case of remoting proxies.
 * @param proxyInterface the interface that the proxy should implement
 * @param interceptor the interceptor that the proxy should invoke
 * @return the proxy object
 * @see #ProxyFactory(Class, org.aopalliance.intercept.Interceptor)
 */
@SuppressWarnings("unchecked")
public static <T> T getProxy(Class<T> proxyInterface, Interceptor interceptor) {
	return (T) new ProxyFactory(proxyInterface, interceptor).getProxy();
}
 
Example #3
Source File: ProxyFactory.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Create a new ProxyFactory for the given interface and interceptor.
 * <p>Convenience method for creating a proxy for a single interceptor,
 * assuming that the interceptor handles all calls itself rather than
 * delegating to a target, like in the case of remoting proxies.
 * @param proxyInterface the interface that the proxy should implement
 * @param interceptor the interceptor that the proxy should invoke
 */
public ProxyFactory(Class<?> proxyInterface, Interceptor interceptor) {
	addInterface(proxyInterface);
	addAdvice(interceptor);
}
 
Example #4
Source File: ProxyFactory.java    From java-technology-stack with MIT License 2 votes vote down vote up
/**
 * Create a new proxy for the given interface and interceptor.
 * <p>Convenience method for creating a proxy for a single interceptor,
 * assuming that the interceptor handles all calls itself rather than
 * delegating to a target, like in the case of remoting proxies.
 * @param proxyInterface the interface that the proxy should implement
 * @param interceptor the interceptor that the proxy should invoke
 * @return the proxy object
 * @see #ProxyFactory(Class, org.aopalliance.intercept.Interceptor)
 */
@SuppressWarnings("unchecked")
public static <T> T getProxy(Class<T> proxyInterface, Interceptor interceptor) {
	return (T) new ProxyFactory(proxyInterface, interceptor).getProxy();
}
 
Example #5
Source File: ProxyFactory.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a new ProxyFactory for the given interface and interceptor.
 * <p>Convenience method for creating a proxy for a single interceptor,
 * assuming that the interceptor handles all calls itself rather than
 * delegating to a target, like in the case of remoting proxies.
 * @param proxyInterface the interface that the proxy should implement
 * @param interceptor the interceptor that the proxy should invoke
 */
public ProxyFactory(Class<?> proxyInterface, Interceptor interceptor) {
	addInterface(proxyInterface);
	addAdvice(interceptor);
}
 
Example #6
Source File: ProxyFactory.java    From lams with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Create a new proxy for the given interface and interceptor.
 * <p>Convenience method for creating a proxy for a single interceptor,
 * assuming that the interceptor handles all calls itself rather than
 * delegating to a target, like in the case of remoting proxies.
 * @param proxyInterface the interface that the proxy should implement
 * @param interceptor the interceptor that the proxy should invoke
 * @return the proxy object
 * @see #ProxyFactory(Class, org.aopalliance.intercept.Interceptor)
 */
@SuppressWarnings("unchecked")
public static <T> T getProxy(Class<T> proxyInterface, Interceptor interceptor) {
	return (T) new ProxyFactory(proxyInterface, interceptor).getProxy();
}
 
Example #7
Source File: ProxyFactory.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Create a new ProxyFactory for the given interface and interceptor.
 * <p>Convenience method for creating a proxy for a single interceptor,
 * assuming that the interceptor handles all calls itself rather than
 * delegating to a target, like in the case of remoting proxies.
 * @param proxyInterface the interface that the proxy should implement
 * @param interceptor the interceptor that the proxy should invoke
 */
public ProxyFactory(Class<?> proxyInterface, Interceptor interceptor) {
	addInterface(proxyInterface);
	addAdvice(interceptor);
}
 
Example #8
Source File: ProxyFactory.java    From spring4-understanding with Apache License 2.0 2 votes vote down vote up
/**
 * Create a new proxy for the given interface and interceptor.
 * <p>Convenience method for creating a proxy for a single interceptor,
 * assuming that the interceptor handles all calls itself rather than
 * delegating to a target, like in the case of remoting proxies.
 * @param proxyInterface the interface that the proxy should implement
 * @param interceptor the interceptor that the proxy should invoke
 * @return the proxy object
 * @see #ProxyFactory(Class, org.aopalliance.intercept.Interceptor)
 */
@SuppressWarnings("unchecked")
public static <T> T getProxy(Class<T> proxyInterface, Interceptor interceptor) {
	return (T) new ProxyFactory(proxyInterface, interceptor).getProxy();
}