package jsbook.chapter5.pager;

import java.util.Date;

import net.jini.core.entry.Entry;

public class PagerMessage implements Entry {
    public String pagerName;    // recipient of the page
    public Integer position;    // position # of msg in channel
    public String content;      // message content
    public String from;         // who sent the page
    public Date timestamp;      // when it was sent

    public PagerMessage() {     // the no-arg constructor
    }

    public PagerMessage(String pagerName) {
        this.pagerName = pagerName;
    }

    public PagerMessage(String pagerName, Integer position) {
        this.pagerName = pagerName;
        this.position = position;
    }

    public PagerMessage(String pagerName, Integer position,
        String content, String from) 
    {
        this.pagerName = pagerName;
        this.position = position;
        this.content = content;
        this.from = from;
        timestamp = new Date();
    }
}
