用途
桥接模式 (Bridge)
将抽象部分与实现部分分离,使它们都可以独立的变化。
桥接模式是一种结构式模式。
结构
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAh4AAAEDCAIAAAD1AZrFAAAgAElEQVR4nOydZ0AURxuAVwQVG7bYBWIs0SCKHTWWRGzYu0bFAiZf1KhoRBL0KCoiRBM1GmmKCCIKKiAIdgUbSlXgkCZNROlHubvdne/HcMtVuAPkTnmfX3dzs7Nzd7vz7M68O0MgAAAAAGhUCGVXAAAAAPjSALUAAAAAjQyoBQAAAGhkQC0AAABAIwNqAQAAABoZUAsAAADQyIBaAAAAgEYG1AIAAAA0MqAWAAAAoJEBtQAAAACNDKgFAAAAaGRALQAAAEAjA2oBAAAAGhlQCwAAANDIgFoAAACARgbUAgAAADQyoBYAAJocmkJUJUK0susBfCpUUy0UonkIIUTzEE0puzJNCy347gDwBQNq+dJRSbXQJCLLEUKIqkA0X9m1aVpoPqIqlF0JAACABqFCaikpKSkACgoKCgoKCwspqpndrgHNmMrKSmWfc18CHA5H2f9kDSqkllmzZvUCevXq1avXN998k5mZqew/BACaCGdnZ2Wfc18C27dvV/Y/WYMKqWX06NF79uy51ZwJu3ErNOjkyZPt2rVLT0+v/l2giwz40jl27NioUaOUffp9joTeunn91q2wW7durVixwsTERNn/ZA2qpZZz584puxZKheYjmv/8+XNRtcDAPvCFc+zYsRkzZii7Fp8jNKK4OBrCwsIC1CIdUAtGXC0A8KUDamk4oBaZgFowoBZARSgpKXn69CmXy/3UO1IhtdDkZxoSDWqRidxqoVXsv294ZURKALUASoHP5xcVFQmHJj5+/Pibb755//69fAXU/0RQIbWQnFr7n+X8jo3bQMlVGqhFJvKqhapAVNWnr47cNLA+NInIUoRqzmdQC6AUnj17NmTIEGGRcLncd+/eyRsHT5Yjup73NyqkllquXGk+IuWI7qUpxC9pzGe9qQpE1f3DglpkIq9aaFLsbzt06JCRkRGLxfpEFUMIIZpCJEdYALXUR9GiEc0XPppBLYBSePToUefOnXNzc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l5+JOsrCwmMSkpCad4e3vzeDWHcWZmprMQz549QwiVlpa6u7s7OzsnsxNiol/evHkTZ/b398fZQkNDcYqfnx+emBwhVFxc7Orq+vHjx7t37+Jsly5doijqypUrKSkpCP2/vTtGUSMKAzh+jCQn8BZJvIMXWIylhVcQQWzESrC1tA6BZC3ExsYLWFlK2NXCYjewcV4KF5GQhXX9MhM3v189yBsQ/szw5ntpuVyORqP9M8p4PJ7P5/sdYoPBYH/94ako+a5FWoAXCJshtvtR+3R1/ELsgvz2QuxYu91utVqz2WyxWHQ6nUajcUjmRZAWoACB4ym73W6/3w/5qZxNp9NqtfrUnLFmszkcDieTSa1Wy3lh55MWoAD/9uRjziUtQAGk5XWTFiAvR5sMpeV1kxYgL4+bDLO0uy9/fH92WrK0u7/0M+RTytLuLqWn7yL7uR9gc1mkBcjZPi0fpCWl9HgXKUvZw59PiQ052TZ30gIUoFwu1+v1aw6+fr7+9qXoRYTp9XrSAuStUqm84/nevil6BScrlUqr1erF/xBpAU623W7XPNPtzfr7cn17U/Q6TrPZbM45YVpaAP6qLGUP/9ugRWkBIJi0ABBMWgAIJi0ABJMWAIJJCwDBpAWAYNICQDBpASCYtAAQTFoACCYtAASTFgCCSQsAwaQFgGDSAkAwaQEgmLQAEExaAAgmLQAEkxYAgv0C11tLZyURZt8AAAAASUVORK5CYII=" alt="" />
图-桥接模式结构图
Implementor : 定义实现接口。
interface Implementor { // 实现抽象部分需要的某些具体功能 public void operationImpl(); }
Abstraction : 定义抽象接口。
abstract class Abstraction { // 持有一个 Implementor 对象,形成聚合关系 protected Implementor implementor; public Abstraction(Implementor implementor) { this.implementor = implementor; } // 可能需要转调实现部分的具体实现 public void operation() { implementor.operationImpl(); } }
ConcreteImplementor : 实现 Implementor 中定义的接口。
class ConcreteImplementorA implements Implementor { @Override public void operationImpl() { // 真正的实现 System.out.println("具体实现A"); } } class ConcreteImplementorB implements Implementor { @Override public void operationImpl() { // 真正的实现 System.out.println("具体实现B"); } }
RefinedAbstraction : 扩展 Abstraction 类。
class RefinedAbstraction extends Abstraction { public RefinedAbstraction(Implementor implementor) { super(implementor); } public void otherOperation() { // 实现一定的功能,可能会使用具体实现部分的实现方法, // 但是本方法更大的可能是使用 Abstraction 中定义的方法, // 通过组合使用 Abstraction 中定义的方法来完成更多的功能。 } }
测试代码
public class BridgePattern { public static void main(String[] args) { Implementor implementor = new ConcreteImplementorA(); RefinedAbstraction abstraction = new RefinedAbstraction(implementor); abstraction.operation(); abstraction.otherOperation(); } }
运行结果
具体实现A 其他操作
应用场景
1、如果你不希望在抽象和实现部分采用固定的绑定关系,可以采用桥接模式,来把抽象和实现部分分开,
然后在程序运行期间来动态的设置抽象部分需要用到的具体的实现,还可以动态切换具体的实现。
2、如果出现抽象部分和实现部分都应该可以扩展的情况,可以采用桥接模式,让抽象部分和实现部分可以
独立的变化,从而可以灵活的进行单独扩展,而不是搅在一起,扩展一边会影响到另一边。
3、如果希望实现部分的修改,不会对客户产生影响,可以采用桥接模式,客户是面向抽象的接口在运行,
实现部分的修改,可以独立于抽象部分,也就不会对客户产生影响了,也可以说对客户是透明的。
4、如果采用继承的实现方案,会导致产生很多子类,对于这种情况,可以考虑采用桥接模式,分析功能变
化的原因,看看是否能分离成不同的纬度,然后通过桥接模式来分离它们,从而减少子类的数目。
要点
如果一个系统需要在构件的抽象化角色和具体化角色之间增加更多的灵活性,避免在两个层次之间建立静态的联系。
抽象化角色和具体化角色都应该可以被子类扩展。在这种情况下,桥接模式可以灵活地组合不同的抽象化角色和具体化角色,并独立化地扩展。
设计要求实现化角色的任何改变不应当影响客户端,或者说实现化角色的改变对客户端是完全透明的。
抽象化角色和具体化角色都应该可以被子类扩展。在这种情况下,桥接模式可以灵活地组合不同的抽象化角色和具体化角色,并独立化地扩展。
设计要求实现化角色的任何改变不应当影响客户端,或者说实现化角色的改变对客户端是完全透明的。