    001/*
    002 * Licensed to the Apache Software Foundation (ASF) under one or more
    003 * contributor license agreements.  See the NOTICE file distributed with
    004 * this work for additional information regarding copyright ownership.
    005 * The ASF licenses this file to You under the Apache License, Version 2.0
    006 * (the "License"); you may not use this file except in compliance with
    007 * the License.  You may obtain a copy of the License at
    008 *
    009 *      https://www.apache.org/licenses/LICENSE-2.0
    010 *
    011 * Unless required by applicable law or agreed to in writing, software
    012 * distributed under the License is distributed on an "AS IS" BASIS,
    013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    014 * See the License for the specific language governing permissions and
    015 * limitations under the License.
    016 */
    017package org.apache.commons.io.monitor;
    018
    019import java.io.File;
    020
    021/**
    022 * Convenience {@link FileAlterationListener} implementation that does nothing.
    023 *
    024 * @see FileAlterationObserver
    025 * @since 2.0
    026 */
    027public class FileAlterationListenerAdaptor implements FileAlterationListener {
    028
    029    /**
    030     * Construct a new instance.
    031     */
    032    public FileAlterationListenerAdaptor() {
    033        // empty
    034    }
    035
    036    /**
    037     * Directory changed Event.
    038     *
    039     * @param directory The directory changed (ignored).
    040     */
    041    @Override
    042    public void onDirectoryChange(final File directory) {
    043        // noop
    044    }
    045
    046    /**
    047     * Directory created Event.
    048     *
    049     * @param directory The directory created (ignored).
    050     */
    051    @Override
    052    public void onDirectoryCreate(final File directory) {
    053        // noop
    054    }
    055
    056    /**
    057     * Directory deleted Event.
    058     *
    059     * @param directory The directory deleted (ignored).
    060     */
    061    @Override
    062    public void onDirectoryDelete(final File directory) {
    063        // noop
    064    }
    065
    066    /**
    067     * File changed Event.
    068     *
    069     * @param file The file changed (ignored).
    070     */
    071    @Override
    072    public void onFileChange(final File file) {
    073        // noop
    074    }
    075
    076    /**
    077     * File created Event.
    078     *
    079     * @param file The file created (ignored).
    080     */
    081    @Override
    082    public void onFileCreate(final File file) {
    083        // noop
    084    }
    085
    086    /**
    087     * File deleted Event.
    088     *
    089     * @param file The file deleted (ignored).
    090     */
    091    @Override
    092    public void onFileDelete(final File file) {
    093        // noop
    094    }
    095
    096    /**
    097     * File system observer started checking event.
    098     *
    099     * @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}