Message-ID: <601891491.33769.1408758847411.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_33768_403671252.1408758847411" ------=_Part_33768_403671252.1408758847411 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
The Proxy Pattern allows one object to = act as a pretend replacement for some other object. In general, whoever is = using the proxy, doesn't realise that they are not using the real thing. Th= e pattern is useful when the real object is hard to create or use: it may e= xist over a network connection, or be a large object in memory, or be a fil= e, database or some other resource that is expensive or impossible to dupli= cate.=20
One common use of the proxy pattern is when talking to remote objects in= a different JVM. Here is the client code for creating a proxy that talks v= ia sockets to a server object as well as an example usage:=20 =20
Here is what your server code might look like (start this first):=20 =20
This example was inspired by this Ruby = example.