Message-ID: <455141851.1343.1429992256931.JavaMail.email@example.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_1342_1623896282.1429992256931" ------=_Part_1342_1623896282.1429992256931 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.