Package com.volantis.synergetics.directory.monitor

Examples of com.volantis.synergetics.directory.monitor.RegistrationException


                                  boolean persistentTimestamps,
                                  boolean recursive)
        throws RegistrationException {

        if (!dir.exists()) {
            throw new RegistrationException("directory-does-not-exist", dir);
        }
        if (dir.isFile()) {
            throw new RegistrationException("file-is-not-directory", dir);
        }
        if (!dir.canWrite()) {
            throw new RegistrationException("directory-is-not-writable", dir);
        }
        String dirName = null;
        try {
            // get the canonical path to avoid duplicates. Note we store
            // String path names rather then files to avoid issues with
            // renames/state changes in File objects
            dirName = dir.getCanonicalPath();
        } catch (IOException e) {
            throw new RegistrationException(e);
        }

        TimestampPersistenceFactory tpf = null;
        if (persistentTimestamps) {
            tpf = new OnDiskTimestampPersistenceFactory();
View Full Code Here


                  String canonicalDirPath,
                  DirectoryMonitorCallback callback,
                  TimestampPersistenceFactory persistenceFactory,
                  boolean recursive) throws RegistrationException {
        if (null == callback) {
            throw new RegistrationException("argument-must-not-be",
                                            new Object[]{"callback", "null"});
        }
        synchronized(lock) {
            boolean found = isRegistered(canonicalDirPath);

            // we didn't find the filename so we can add it
            if (found) {
                throw new RegistrationException(
                    "directory-already-registered", canonicalDirPath);
            } else {
                final MonitoredDirectoryInfo mdi = new MonitoredDirectoryInfo(
                        canonicalDirPath, bundleId, callback,
                        persistenceFactory, recursive);
View Full Code Here

TOP

Related Classes of com.volantis.synergetics.directory.monitor.RegistrationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.