For performance reasons, a Proxy will never be as fast as an actual delegate class. While the Proxy allows the library to be compatible with future Java versions that keep on adding methods to the Connection class hierarchy (as we got used to it by now), the performance penalty might be to much for paying of.
The ConnectionDecorator simply delegates all calls to the actual Connection object. The newer Java 1.7 and 1.8 methods are invoked using reflection, to allow compiling the project with Java 1.6
For performance reasons, a Proxy will never be as fast as an actual delegate class. While the Proxy allows the library to be compatible with future Java versions that keep on adding methods to the Connection class hierarchy (as we got used to it by now), the performance penalty might be to much for paying of.
The ConnectionDecorator simply delegates all calls to the actual Connection object. The newer Java 1.7 and 1.8 methods are invoked using reflection, to allow compiling the project with Java 1.6