Java 代理模式 (二) 动态代理

时间:2023-12-11 17:50:44

代理模式

  代理(Proxy)是一种设计模式, 提供了对目标对象另外的访问方式;即通过代理访问目标对象。

  这样好处: 可以在目标对象实现的基础上,增强额外的功能操作。(扩展目标对象的功能)。

代理模式的关键点: 代理对象与目标对象。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAi4AAACsCAIAAADTz7ByAAAgAElEQVR4nO2dd1hT1//HD85q1bYWR79qHXVUrXvVaquti59VrHvUgeJCa0Woe1RRcYGIoKgg4kJUkL1BQUGGIjMhIYEMkpBBEkb2ur8/rg2IguGSkCuc13OfPpgm577vOu97zvmczwEIBAKBQCBmBZhbAAQCgUBaO2a2Ip1OR2OJNFqteWV8EJ0OoeNcmwZqazS41sYWqXGrjQW1YQHv11SNF23QiuoFWhE28KwNgVaEFVxX93jWhvNrCq0IBVoRNvBc3eNZGwKtCCu4ru7xrA3n1xRaEQq0ImzgubrHszYEWhFWcF3d41kbzq8ptCIUaEXYwHN1j2dtCLQirOC6usezNpxfU2hFKNCKsIHn6h7P2hBoRVjBdXWPZ204v6bQivTQWCKtTmduFR+GjnNtWqit0eBaG1ukwa02FtSGBbxfUw1etL21IrlSbZ5NoSpmCqVypdkENKRNjXdtMqit0RuutZUKJbjVxoTaMGnD+TWVml/bO1bEYIvMtRGoXLr59t7wRsS5Npb5ZUBtxtVGg9qgtlam7R0rMiN0lkiH4KWRWAcGzrXhteEPtWGDWVZpbgn1wsBxxyautXFwrI0l0uKtg85cwLAFbOA5NADP2hBThi1oNJqKigqRSCTGCoFMF5QLMf/cWIhEIomkWvfuKCmuQwPwrA2GLRgGtKJ6gVaEDTxrQ0xpRUwmMysri0gkFn7iEInEV69eVVdX1zlvuK5ScasNWpFhQCuqF2hF2MCzNsSUVkShUAQCgSlKbn7IZLJQKKz9Ca6rezxrg1ZkGNCK6gVaETbwrA0xpRVRqVQul2uKkpsfEokkEolqf4Lr6h7P2qAVGQa0onqBVoQNPGtDoBUZBolEqtNBx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k5Js3b6hUalEtyGRyowaoKioqav+cQqEUFRUlJydHRETcu3fPzc3t9OnTO3bs2L59+8KFC62srCZMmDBs2LBvvvmm9jhZbdq0afPdd9/98ssvq1ev/ueff9zd3f39/VNSUhqe9ENn4bi6h1ZkGNCK6gVaETbwrA3BtxUZWG1pNJqqqqqysrKioqLMzMzHjx+7urru2rVr0aJFY8aM6du3b48ePbp27dpw+lELC4tu3br1eBdLS8uBAwcON4zvv/++X79+75dQn0Hq+fzzz3v06NGnT5/hw4dbWVnZ2dk5Ozv7+/u/fPmSRCJxOJyKiopGLXoErQgb0IpqgFaEDTxX93jWhrQIK2oYHo9XVFT05s2b6OjokJAQLy+vixcvHjhwwM7Obv369fPmzZs1a9bw4cOHDBny1VdftW/fvkMt6mus1EeHd2nfvn2XLl0GDx48bNiwGTNmzJs3b/Xq1XZ2do6Oji4uLpcvXw4MDIyMjMzMzKRQKEacWwqtCBvQimqAVoQNPFf3eNaGtAIrahiVSiWXy0tLS+l0em5ublpaWnotMjIy4uLigj/EjZv3AoOe1P4kOjo6MzOz9s/T0tKysrLodDqDwZBKpc0WTAGtCBvQimqAVoQNPFf3eNaGtHorwkyFBC9Rv+8DrQgb0IpqgFaEDTxX93jWhkArwgquq3s8a8P5NYVWhAKtCBt4ru7xrA2BVoQVXFf3eNaG82sKrUgPnS1G8JtyFN/acJsJAmrDBIMjxm92DzbUhgW8X1PcZIL4Lx1qmdg8G5qekiMym4BPWhsbamv0BrVBbVAbrrS9Y0VSmdIsm0SqpDLKq6QKcwn4tLVJoLZGb7jWxsSxNjyfNzxrw/k1rTa/tnesyIzQWTheEwjn2nDTuK4D1IYNBgdH68fUgcGC2rCA92sK06GiwLAFbOA5NADP2hAYtoAVXIcG4Fkbzq8pDFuAQCAQCAQFWhEEAoFAzMz/A7Gu277kohYEAAAAAElFTkSuQmCCAA==" alt="" width="443" height="196" />

动态代理,

1)代理对象,不需要实现接口;

2)代理对象的生成,是利用JDKAPI, 动态的在内存中构建代理对象(需要我们指定创建 代理对象/目标对象 实现的接口的类型;);

3)  动态代理也称 JDK代理和接口代理;

JDK中生成代理对象的API:

|-- Proxy

static Object newProxyInstance(

ClassLoader loader,       指定当前目标对象使用类加载器

Class<?>[] interfaces,     目标对象实现的接口的类型

InvocationHandler h       事件处理器

)

代码示例:

1、目标对象须实现的接口
package org.fkjava.b_dynamic;
public interface IUserDao {

    void save();
}
2、目标对象,实现接口
package org.fkjava.b_dynamic;
public class UserDaoImpl implements IUserDao{ @Override
public void save() {
System.out.println("-----已保存数据-----");
} }
3、使用代理工厂,生产代理对象
package org.fkjava.b_dynamic;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
/**
* 这是一个代理工厂,用来生产代理对象
* 给所有的dao创建代理对象[动态代理]
* 代理对象不需要实现接口
*/
public class ProxyFactory { //通过构造器维护一个目标对象,这里用Object,表示可以给所有的目标对象生产代理对象
private Object target;
public ProxyFactory(Object target){
this.target = target;
} // 给目标对象,生成代理对象
public Object getProxyInstance(){
return Proxy.newProxyInstance(
target.getClass().getClassLoader(), //当前目标对象使用类加载器
target.getClass().getInterfaces(), //目标对象要实现的接口的类型
new InvocationHandler() { //事件处理器 @Override
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable { System.out.println("开启事务"); //执行目标对象方法
Object returnValue = method.invoke(target, args); System.out.println("提交事务"); return returnValue;
}
});
}
}
4、测试动态代理类
package org.fkjava.b_dynamic;
public class Test_dynamic {
public static void main(String[] args) {
//目标对象
IUserDao target = new UserDaoImpl();
System.out.println(target.getClass());//【原始的类型 class cn.itcast.b_dynamic.UserDao】 //通过代理工厂给目标对象创建代理对象
//proxy对象是在内存中生成的代理对象
IUserDao proxy = (IUserDao) new ProxyFactory(target).getProxyInstance();
System.out.println(proxy.getClass());// class $Proxy0   内存中动态生成的代理对象 //执行方法 [代理对象]
proxy.save();
}
}

  5、输出结果:

    class org.fkjava.b_dynamic.UserDaoImpl
    class com.sun.proxy.$Proxy0
    开启事务
    -----已保存数据-----
    提交事务

动态代理总结:

代理对象不需要实现接口,但是目标对象一定要实现接口;否则不能用动态代理!
         (class  $Proxy0 
implements IuserDao)

思考:

有一个目标对象,想要功能扩展,但目标对象没有实现接口,怎样功能扩展?

Class  UserDao{}

//
子类的方式

Class
subclass  extends  UserDao{}                                           

以子类的方式实现(cglib代理)