1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17 package org.apache.commons.io.monitor;
18
19 import java.io.File;
20
21 /**
22 * Convenience {@link FileAlterationListener} implementation that does nothing.
23 *
24 * @see FileAlterationObserver
25 * @since 2.0
26 */
27 public class FileAlterationListenerAdaptor implements FileAlterationListener {
28
29 /**
30 * Construct a new instance.
31 */
32 public FileAlterationListenerAdaptor() {
33 // empty
34 }
35
36 /**
37 * Directory changed Event.
38 *
39 * @param directory The directory changed (ignored).
40 */
41 @Override
42 public void onDirectoryChange(final File directory) {
43 // noop
44 }
45
46 /**
47 * Directory created Event.
48 *
49 * @param directory The directory created (ignored).
50 */
51 @Override
52 public void onDirectoryCreate(final File directory) {
53 // noop
54 }
55
56 /**
57 * Directory deleted Event.
58 *
59 * @param directory The directory deleted (ignored).
60 */
61 @Override
62 public void onDirectoryDelete(final File directory) {
63 // noop
64 }
65
66 /**
67 * File changed Event.
68 *
69 * @param file The file changed (ignored).
70 */
71 @Override
72 public void onFileChange(final File file) {
73 // noop
74 }
75
76 /**
77 * File created Event.
78 *
79 * @param file The file created (ignored).
80 */
81 @Override
82 public void onFileCreate(final File file) {
83 // noop
84 }
85
86 /**
87 * File deleted Event.
88 *
89 * @param file The file deleted (ignored).
90 */
91 @Override
92 public void onFileDelete(final File file) {
93 // noop
94 }
95
96 /**
97 * File system observer started checking event.
98 *
99 * @param observer The file system observer (ignored).
100 */
101 @Override
102 public void onStart(final FileAlterationObserver observer) {
103 // noop
104 }
105
106 /**
107 * File system observer finished checking event.
108 *
109 * @param observer The file system observer (ignored).
110 */
111 @Override
112 public void onStop(final FileAlterationObserver observer) {
113 // noop
114 }
115
116 }