Package com.sun.enterprise.util.io

Examples of com.sun.enterprise.util.io.WindowsRemoteFileSystem


     * 2. copy the token/auth stuff into it
     * 3. add the correct args to the remote commandline
     *    Put the file in the same directory that asadmin lives in (bin)
     */
    private void setupAuthTokenFile(List<String> cmd, List<String> stdin) throws WindowsException {
        WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(dcomInfo.getCredentials());
        authTokenFilePath = dcomInfo.getAsadminParentPath() + "\\token_" + System.nanoTime() + new Random().nextInt(1000);
        authTokenFilePath = createUniqueFilename(dcomInfo.getAsadminParentPath());
        authTokenFile = new WindowsRemoteFile(wrfs, authTokenFilePath);
        authTokenFile.copyFrom(stdin);

View Full Code Here


     */
    void pingDcomConnection(String host, String domain, String username,
            String password, String installRoot) throws CommandValidationException {
        try {
            installRoot = installRoot.replace('/', '\\');
            WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(host, username, password);
            WindowsRemoteFile wrf = new WindowsRemoteFile(wrfs, installRoot);
            WindowsCredentials creds = new WindowsCredentials(host, domain, username, password);

            // also looking for side-effect of Exception getting thrown...
            if (!wrf.exists()) {
View Full Code Here

                final Node node,
                final Logger logger) throws BootstrapException {
            super(habitat, dasInstanceDir, remoteNodeDir, instance, node, logger);
            try {
                info = new DcomInfo(node);
                wrfs = new WindowsRemoteFileSystem(info.getHost(), info.getUser(), info.getPassword());
            }
            catch (WindowsException ex) {
                throw new BootstrapException(ex);
            }
        }
View Full Code Here

            return;

        try {
            for (String host : hosts) {
                String remotePassword = getWindowsPassword(host);
                WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(host, getRemoteUser(), remotePassword);
                WindowsRemoteFile remoteInstallDir = new WindowsRemoteFile(wrfs, getInstallDir());

                if (remoteInstallDir.exists())
                    throw new CommandException(Strings.get("install.dir.exists", getInstallDir()));
            }
View Full Code Here

    @Override
    final void deleteFromHosts() throws CommandException {
        for (String host : hosts) {
            try {
                String pw = getWindowsPassword(host);
                WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(host, getRemoteUser(), pw);
                WindowsRemoteFile remoteInstallDir = new WindowsRemoteFile(wrfs, getInstallDir());

                if (!remoteInstallDir.exists()) {
                    throw new CommandException(
                            Strings.get("remote.install.dir.already.gone", getInstallDir()));
View Full Code Here

        final String zipFileName = "glassfish_install.zip";
        final String unpackScriptName = "unpack.bat";

        for (String host : hosts) {
            String remotePassword = getWindowsPassword(host);
            WindowsRemoteFileSystem wrfs = new WindowsRemoteFileSystem(host, getRemoteUser(), remotePassword);
            WindowsRemoteFile remoteInstallDir = new WindowsRemoteFile(wrfs, windowsInstallDir);
            remoteInstallDir.mkdirs(getForce());
            WindowsRemoteFile remoteZip = new WindowsRemoteFile(remoteInstallDir, zipFileName);
            WindowsRemoteFile unpackScript = new WindowsRemoteFile(remoteInstallDir, unpackScriptName);
            //createUnpackScript
View Full Code Here

        if (!ok(windowsdomain))
            windowsdomain = host;

        creds = new WindowsCredentials(host, windowsdomain, user, password);
        wrfs = new WindowsRemoteFileSystem(creds);
        scriptFullPath = testdir + "\\" + SCRIPT_NAME;
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.util.io.WindowsRemoteFileSystem

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.