1 24 25 package org.objectweb.dream.multiplexer; 26 27 import java.util.Map ; 28 29 import org.objectweb.dream.Pull; 30 import org.objectweb.dream.Push; 31 32 35 public class PeriodicAttachment extends Attachment 36 { 37 protected long startingDate; 38 protected long pullingFrequencyInMillis; 39 protected long endDate; protected long nextDeadline = 0; 42 43 48 public static final String STARTING_DATE = "startingDate"; 49 50 55 public static final String END_DATE = "endDate"; 56 57 62 public static final String PULLING_FREQUENCY = "pullingFrequency"; 63 64 69 public static final String TIMESTAMP = "timestamp"; 70 71 85 public PeriodicAttachment(int id, String [] inputNames, Pull[] inputs, 86 Map [] inputContexts, String [] outputNames, Push[] outputs, 87 Map [] outputContexts, long startingDate, long pullingFrequencyInMillis, 88 long endDate) 89 { 90 super(id, inputNames, inputs, inputContexts, outputNames, outputs, 91 outputContexts); 92 this.startingDate = startingDate; 93 this.pullingFrequencyInMillis = pullingFrequencyInMillis; 94 this.endDate = endDate; 95 this.nextDeadline = startingDate; 96 } 97 98 112 public PeriodicAttachment(int id, String [] inputNames, Pull[] inputs, 113 Map [] inputContexts, String [] outputNames, Push[] outputs, 114 Map [] outputContexts, long startingDate, long pullingFrequencyInMillis) 115 { 116 this(id, inputNames, inputs, inputContexts, outputNames, outputs, 117 outputContexts, startingDate, pullingFrequencyInMillis, 0); 118 } 119 120 125 public long getNextDeadline() 126 { 127 return nextDeadline; 128 } 129 130 135 public void setNextDeadline(long nextDeadline) 136 { 137 this.nextDeadline = nextDeadline; 138 } 139 140 145 public long getStartingDate() 146 { 147 return startingDate; 148 } 149 150 155 public long getEndDate() 156 { 157 return endDate; 158 } 159 160 165 public void setEndDate(long endDate) 166 { 167 this.endDate = endDate; 168 } 169 170 175 public long pullingFrequencyInMillis() 176 { 177 return pullingFrequencyInMillis; 178 } 179 180 185 public Object clone() 186 { 187 return super.clone(); 188 } 189 190 } | Popular Tags |