Chapter 12. Agents and patterns

  • Introduction—Mobile agents—Callbacks—Mobile servers—Agents and design patterns—Adapter—Proxy—Client-server patterns—Singleton—Remote factory—Abstract remote—Session—Exercises—Remarks

In this chapter

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.

Introduction

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 ...

Get java.rmi: The Remote Method Invocation Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.