Introduction—Mobile agents—Callbacks—Mobile servers—Agents and design patterns—Adapter—Proxy—Client-server patterns—Singleton—Remote factory—Abstract remote—Session—Exercises—Remarks
We discuss mobile agents as a programming technique made possible by RMI, and their relationship to various existing “design patterns”. We then consider some fundamental design patterns as they relate to RMI, and introduce a few variants of our own—including the “Abstract Remote” pattern.
An agent acts on your behalf. As in a spy novel, you send an agent somewhere, or leave him behind to carry out your instructions when you move.
Agents in RMI exploit two features of Java: serialization and polymorphism. Serialization ...