1 package chat.business; 2 3 import chat.spec.*; 4 5 public class DiscussionManagerImpl implements DiscussionManager { 6 7 8 public DiscussionManagerImpl() { 9 } 10 11 12 16 public void addMessage(String name, String txt) { 17 Discussion.addMessage(name,txt); 18 } 19 20 21 22 23 24 25 29 public void clear() { 30 Discussion.clear(); 31 } 32 33 34 35 36 57 public Snapshot getContents(long currentState, long wait) { 58 59 return Discussion.getContents(currentState, wait); 60 } 61 62 63 64 68 public int getNumWaiting() { 69 return Discussion.getNumWaiting(); 70 } 71 72 public long getTotalReceived(){ 73 return Discussion.getTotalReceived(); 74 } 75 76 public long getCurrentSize(){ 77 return Discussion.getCurrentSize(); 78 } 79 80 81 82 public void setMaxQueueSize(int maxQueueSize){ 83 Discussion.maxQueueSize=maxQueueSize; 84 } 85 86 87 88 89 111 public void startHarvester(int lifetimeSec, int intervalSec) { 112 113 Discussion.startHarvester(lifetimeSec,intervalSec); 114 115 } 116 public void stopHarvester(){ 117 Discussion.stopHarvester(); 118 } 119 120 } 121 122 123 | Popular Tags |