Design Patterns Java™ Workbook
Chapter 10. Mediator Figure 10.1. This application lets its user manually update the location of a tub of chemicals. Figure 10.2 ...
Chapter 10. Mediator About half of the methods in PlaceATub_1 exist to lazy-initialize variables that contain the application's ...
Chapter 10. Mediator CHALLENGE 10.1 Complete the diagram in Figure 10.3 to show a refactoring of PlaceATub_1, introducing a new ...
Chapter 10. Mediator Relational Integrity An object model is relationally consistent if every time object a points to object b, ...
Chapter 10. Mediator T389 ShellAssembler-2301 T001 Fuser-2101 T002 Fuser-2101 Consider the rubber tubs of chemicals at Oozinoz. ...
Chapter 10. Mediator Consider a defect that occurred at Oozinoz when a developer began modeling a new machine that included a ba ...
Chapter 10. Mediator public Machine getMachine(Tub t) { return (Machine) tubToMachine.get(t); } public Set getTubs(Machine m) { ...
Chapter 10. Mediator When you have an object model that is not tied to a relational database, you can use mediators to sustain t ...
Chapter 11. Proxy............................................................................................................... ...
Chapter 11. Proxy Figure 11.1. Three screen shots show a mini-application before, during, and after loading a large image. (Phot ...
Chapter 11. Proxy Figure 11.2. An ImageIconProxy object forwards paint() requests to the current ImageIcon object. When the user ...
Chapter 11. Proxy Figure 11.3. An ImageIconProxy object can stand in for an ImageIcon object because an ImageIconProxy object is ...
Chapter 11. Proxy public ImageIconProxy(String filename) { super(ABSENT.getImage()); this.filename = filename; } public void loa ...
Chapter 11. Proxy Image Proxies Reconsidered.................................................................................... ...
Chapter 11. Proxy import java.awt.; import javax.swing.; public class ImageIconLoader extends ImageIcon implements Runnable { st ...
Chapter 11. Proxy were local. You should be able to call methods on a proxy object that forwards the calls to the real object on ...
Chapter 11. Proxy Figure 11.5. To use RMI, you can define the interface you want for messages that pass between computers and cr ...
Chapter 11. Proxy public void boost(double factor) { apogee *= factor; } public double getApogee() { return apogee; } public dou ...
Chapter 11. Proxy c:\rmi> rmiregistry 5000 With the registry running on the server machine, you can create and register a Roc ...
Chapter 11. Proxy working on a single machine, you can still test out RMI, accessing the server on localhost rather than another ...
«
1
2
3
4
5
6
7
8
9
10
»
Free download pdf