Then we write a server application class to
Arguments to, or return values from, remote methods can be of
any Java type,
including objects, as long as those objects implement the interface
java.io.Serializable
. Most of the core Java classes in
java.lang
and
java.util
implement the Serializable
interface.
Next is the source for the ThermometerImpl.java
file,
that contains
the code for the implementation of the Thermometer server. In this code, we
use the observer/observable paradigm as before, but because of a lack of
multiple inheritance, we choose to reimplement the methods.