-
Notifications
You must be signed in to change notification settings - Fork 5
/
architecture.html
131 lines (99 loc) · 5.89 KB
/
architecture.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
(c) 2005, 2009, 2010 ThoughtWorks Ltd. All rights reserved.
(c) 2015 ProxyToys Committers. All rights reserved.
The software in this package is published under the terms of the BSD
style license a copy of which has been included with this distribution in
the LICENSE.txt file.
Created on 07-May-2005
-->
<head>
<title>ProxyToys - Architecture Overview</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<div id="banner">
<a href="index.html"><img id="logo" src="logo.gif" alt="ProxyToys Logo"/></a>
<div id="title">Architecture Overview</div>
</div>
<div id="center" class="Content2Column">
<div id="content">
<!-- ************ -->
<h1 id="components">Components</h1>
<p>ProxyToys consists of two main components:</p>
<ul>
<li><b>Proxy Factories</b></li>
<li><b>Toy Factories</b></li>
</ul>
<p>The Proxy Factories provide an independent way to create general proxy instances. The toys
are factories for common problems solved with proxies (and themselves use Proxy Factories).</p>
<!-- ************ -->
<h1 id="factories">Proxy Factories</h1>
<p>Whenever you have a need to create a dynamic proxy, you may use an implementation of the
<a href="apidocs/com/thoughtworks/proxy/ProxyFactory.html">ProxyFactory</a> instead depending
directly on the proxy provided by the reflection API of the JDK.</p>
<p>ProxyToys comes with two implementations of such a factory, one based on the reflection API
of the JDK itself and the other one based on CGLIB. Each implementation has its own limitations and
you might switch the proxy factory depending on the runtime environment as explained in the
<a href="faq.html#Compatibility_CGLIB">FAQ</a>.</p>
<p class="highlight">Always depend on
<a href="apidocs/com/thoughtworks/proxy/ProxyFactory.html">ProxyFactory</a> and select the
implementation of your choice.</p>
<p>Other bytecode manipulation libraries may be used to implement alternative ProxyFactory
implementations as long as they can support or be used to build a compatible
<a href="apidocs/com/thoughtworks/proxy/Invoker.html">invoker interface</a>.</p>
<!-- ************ -->
<h1 id="toys">Toys</h1>
<p>The toys exist as solutions for common problems solved with proxy instances. Some are build on
top of another and you may derive your own specialized solution based on a available toy implementation.
Each toy has a builder as proxy factory, that can be invoked to create a proxy for a single or for multiple
types with a special assignment. the <a href="apidocs/com/thoughtworks/proxy/toys/pool/Pool.html">Pool</a>
supports additionally normal constructors, because it is a normal object <em>using</em> proxies.</p>
<p>Each toys utilizes a special implementation of an
<a href="apidocs/com/thoughtworks/proxy/Invoker.html">Invoker</a>, that is called for each method
invocation. In most toy implementations each proxy has its own Invoker instance. For very specialized
proxies, you might use a different strategy though.</p>
<br/><br/>
</div>
</div>
<div class="SidePanel" id="left">
<div class="MenuGroup">
<h1>ProxyToxy in General</h1>
<ul>
<li><a href="index.html">About ProxyToys</a></li>
<li><a href="news.html">News</a></li>
<li><a href="changes.html">Change History</a></li>
<li><a href="license.html">License</a></li>
<li><a href="download.html">Download</a></li>
<li><a href="versioning.html">About Versioning</a></li>
</ul>
</div>
<div class="MenuGroup">
<h1>Using ProxyToys</h1>
<ul>
<li><a href="tutorial.html">One minute Tutorial</a></li>
<li><a href="factories.html">Proxy Factories</a></li>
<li><a href="toys.html">Toys</a></li>
<li><a href="faq.html">Frequently Asked Questions</a></li>
<li><a href="example-code.html">Example Code</a></li>
<li><a href="mailing-lists.html">Mailing Lists</a></li>
<li><a href="apidocs/index.html">Javadoc</a></li>
<li><a href="issues.html">Reporting Issues</a></li>
</ul>
</div>
<div class="MenuGroup">
<h1>Developing ProxyToys</h1>
<ul>
<li class="currentLink">Architecture Overview</li>
<li><a href="how-to-contribute.html">How to Contribute</a></li>
<li><a href="team.html">Development Team</a></li>
<li><a href="repository.html">Source Repository</a></li>
<li><a href="https://github.com/proxytoys/proxytoys">GitHub Project</a></li>
<li><a href="http://ci.codehaus.org/browse/PROXYTOYS">Build Status</a></li>
<li><a href="https://www.openhub.net/p/10075">Code Statistics</a></li>
</ul>
</div>
</div>
</body>
</html>