129 *
130 * <p> If this watch key has already been cancelled then invoking this
131 * method has no effect. Once cancelled, a watch key remains forever invalid.
132 */
133 void cancel();
134
135 /**
136 * Returns the object for which this watch key was created. This method will
137 * continue to return the object even after the key is cancelled.
138 *
139 * <p> As the {@code WatchService} is intended to map directly on to the
140 * native file event notification facility (where available) then many of
141 * details on how registered objects are watched is highly implementation
142 * specific. When watching a directory for changes for example, and the
143 * directory is moved or renamed in the file system, there is no guarantee
144 * that the watch key will be cancelled and so the object returned by this
145 * method may no longer be a valid path to the directory.
146 *
147 * @return the object for which this watch key was created
148 */
149 //T watchable();
150 }
|
129 *
130 * <p> If this watch key has already been cancelled then invoking this
131 * method has no effect. Once cancelled, a watch key remains forever invalid.
132 */
133 void cancel();
134
135 /**
136 * Returns the object for which this watch key was created. This method will
137 * continue to return the object even after the key is cancelled.
138 *
139 * <p> As the {@code WatchService} is intended to map directly on to the
140 * native file event notification facility (where available) then many of
141 * details on how registered objects are watched is highly implementation
142 * specific. When watching a directory for changes for example, and the
143 * directory is moved or renamed in the file system, there is no guarantee
144 * that the watch key will be cancelled and so the object returned by this
145 * method may no longer be a valid path to the directory.
146 *
147 * @return the object for which this watch key was created
148 */
149 Watchable watchable();
150 }
|