10.7. The Messenger Applet
Finally, we have the various entries and supporting classes behind us and we can now turn our attention to the Messenger class that ties the application together. Let's start by looking at the skeleton of the Messenger class:
public class Messenger extends Applet implements ActionListener { //... user interface variables go here private JavaSpace space; private TransactionManager mgr; private String username; private String password; public void init() { super.init(); showStatus("Getting space"); space = SpaceAccessor.getSpace(); mgr = TransactionManagerAccessor.getManager(); login = new Login(this); } //... method to set up messenger console interface goes here //... actionPerformed method (for console events) goes ...
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.