Examples of ExportEntry


Examples of net.xeoh.plugins.remotediscovery.impl.common.discoverymanager.impl.ExportEntry

     * @param url
     */
    @Override
    public void anouncePlugin(Plugin plugin, PublishMethod method, URI url) {

        final ExportEntry entry = new ExportEntry();
        entry.plugin = plugin;
        entry.method = method;
        entry.uri = url;
        entry.timeOfExport = System.currentTimeMillis();

View Full Code Here

Examples of org.jnode.net.nfs.nfs2.mount.ExportEntry

        } catch (PrivilegedActionException e) {
            return;
        }

        for (int i = 0; i < exportEntryList.size(); i++) {
            ExportEntry exportEntry = exportEntryList.get(i);
            if (exportEntry.getDirectory().startsWith(partialDirectory)) {
                completions.addCompletion(hostName + ":" + exportEntry.getDirectory());
            }
        }
    }
View Full Code Here

Examples of org.jnode.net.nfs.nfs2.mount.ExportEntry

        } catch (MountException e1) {
            mountClient.close();
            throw new IOException(e1.getMessage());
        }

        ExportEntry exportEntry = null;
        for (ExportEntry e : exportList) {
            if (path.startsWith(e.getDirectory())) {
                if (exportEntry == null) {
                    exportEntry = e;
                } else {
                    if (exportEntry.getDirectory().length() < e.getDirectory().length()) {
                        exportEntry = e;
                    }
                }
            }
        }
        if (exportEntry == null) {
            throw new IOException("The path " + path + " it is not exported");
        }
        mountDirectory = exportEntry.getDirectory();
        MountResult mountResult;
        try {
            mountResult = mountClient.mount(mountDirectory);
        } catch (MountException e) {
            mountClient.close();
            throw new IOException(e.getMessage());
        }

        byte[] tempFileHandle = mountResult.getFileHandle();
        try {
            String filePath = path.substring(exportEntry.getDirectory().length());
            StringTokenizer tokenizer = new StringTokenizer(filePath, "/");
            List<String> tokenList = new ArrayList<String>();
            while (tokenizer.hasMoreElements()) {
                String t = tokenizer.nextToken();
                tokenList.add(t);
View Full Code Here

Examples of org.jnode.net.nfs.nfs2.mount.ExportEntry

                // ignore
            }
            throw e;
        }

        ExportEntry exportEntry = null;
        for (ExportEntry e : exportList) {
            if (path.startsWith(e.getDirectory())) {
                if (exportEntry == null) {
                    exportEntry = e;
                } else {
                    if (exportEntry.getDirectory().length() < e.getDirectory().length()) {
                        exportEntry = e;
                    }
                }
            }
        }

        if (exportEntry == null) {
            throw new IOException("The path " + path + " it is not exported");
        }
        mountDirectory = exportEntry.getDirectory();
        MountResult mountResult;
        try {
            mountResult = mountClient.mount(mountDirectory);
        } catch (MountException e) {
            try {
                mountClient.close();
            } catch (IOException e1) {
                // ignore
            }
            throw new IOException(e.getMessage());
        } catch (IOException e) {
            try {
                mountClient.close();
            } catch (IOException e1) {
                // ignore
            }
            throw e;
        }

        byte[] tempFileHandle = mountResult.getFileHandle();

        try {
            String filePath = path.substring(exportEntry.getDirectory().length());
            StringTokenizer tokenizer = new StringTokenizer(filePath, "/");
            while (tokenizer.hasMoreElements()) {
                String t = tokenizer.nextToken();
                LookupResult lookup = nfsClient.lookup(tempFileHandle, t);
                if (lookup.getFileAttribute().getType() == FileAttribute.FILE) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.