1 23 24 37 package com.sun.enterprise.server; 38 39 import java.io.File ; 40 41 47 final class MonitorableEntry { 48 49 57 MonitorableEntry(String id, String displayName, File monitoredFile, 58 MonitorListener listener) { 59 60 this.id = id; 61 this.displayName = displayName; 62 this.monitoredFile = monitoredFile; 63 this.lastReloadedAt = monitoredFile.lastModified(); 64 this.listener = listener; 65 } 66 67 74 MonitorableEntry(String id, File monitoredFile, MonitorListener listener) { 75 76 this(id, id, monitoredFile, listener); 77 } 78 79 85 MonitorableEntry(File monitoredFile, MonitorListener listener) { 86 87 this("AutoDeployDirectory", monitoredFile, listener); 88 } 89 90 95 String getId() { 96 return this.id; 97 } 98 99 105 String getDisplayName() { 106 return this.displayName; 107 } 108 109 114 long getLastReloadedTimeStamp() { 115 return this.lastReloadedAt; 116 } 117 118 123 MonitorListener getListener() { 124 return this.listener; 125 } 126 127 132 File getMonitoredFile() { 133 return this.monitoredFile; 134 } 135 136 141 void setLastReloadedTimeStamp(long ts) { 142 this.lastReloadedAt = ts; 143 } 144 145 150 public int hashCode() { 151 return id.hashCode(); 152 } 153 154 159 public boolean equals(Object other) { 160 return monitoredFile.equals(((MonitorableEntry) other).monitoredFile); 161 } 162 163 private String id; 165 private String displayName; 166 private File monitoredFile; 167 private long lastReloadedAt; 168 private MonitorListener listener; 169 } 170 | Popular Tags |