001 package edu.harvard.deas.hyperenc; 002 003 import java.util.List; 004 005 /** 006 * Sends and receives messages. Converts HyperMessages into a some other format 007 * for transmission, and vice versa. 008 */ 009 public interface HyperCommunicator { 010 011 /** 012 * Sends a message. 013 * @param hm the HyperMessage to be sent 014 */ 015 public void send(HyperMessage hm); 016 017 /** 018 * Retrieves incoming messages. 019 * @return a list of HyperMessages that have been received since the last time 020 * this method was called 021 */ 022 public List<HyperMessage> receive(); 023 024 }