2.1. Entries
Entries are the common currency of all space-based applications; by exchanging entries, processes can communicate, synchronize and coordinate their activities.
An entry is just an object that follows a few conventions to make it safe for travel through a space. Let's define an entry:
import net.jini.core.entry.*; public class SpaceShip implements Entry { // a no-arg constructor public SpaceShip() { } }
Here we've defined an entry called SpaceShip. We first import the net.jini.core.entry package, which contains the Entry interface. For a class to be an entry it needs to implement the Entry interface. You can also create an entry by extending a class that already implements the Entry interface, which we will see later in this chapter. ...
Get JavaSpaces™ Principles, Patterns, and Practice 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.