com.arunta.app.remote
Class TRScpConnection

java.lang.Object
  extended by com.arunta.app.remote.TRScpConnection

public class TRScpConnection
extends java.lang.Object

Secure copy (SCP) connection to a Total Recall VR system.

This is a connection which can be used to transfer files to and from a Total Recall VR system in a secure way. Note that it is not possible to use this connection to connect to systems other than Total Recall VR.


Constructor Summary
TRScpConnection(java.lang.String ipAddress, java.lang.String userName)
          Creates a SCP connection to the specified Total Recall VR system.
 
Method Summary
 void close()
          Closes the SCP connection to a TOTAL recall system.
 void getAsRemoteFile(java.lang.String remoteFileName, java.lang.String localFileName)
          Copies a file from the Total Recall VR system to a local file with a different file name than the name of the file on the Total Recall VR system.
 void getRemoteFile(java.lang.String remoteFileName, java.lang.String localDirName)
          Copies a file from the Total Recall VR system to a local directory.
 void getRemoteFiles(java.lang.String[] remoteFileNames, java.lang.String localDirName)
          Copies a set of files from the Total Recall VR system to a local directory.
 boolean isAuthorized()
          Test if the user is authorised for SCP operations after establishing a connection to a Total Recall VR system.
 void putAsLocalFile(java.lang.String localFileName, java.lang.String remoteFileName, java.lang.String mode)
          Copies a local file to the Total Recall VR system with a different file name than the name of the local file.
 void putLocalFile(java.lang.String localFileName, java.lang.String remoteDirName, java.lang.String mode)
          Copies a local file to the Total Recall VR system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TRScpConnection

public TRScpConnection(java.lang.String ipAddress,
                       java.lang.String userName)
                throws java.io.IOException
Creates a SCP connection to the specified Total Recall VR system.

Parameters:
ipAddress - An IP address of a Total Recall VR system.
userName - In most cases (if not all) it is sufficient to use totalrecall for this parameter.
Throws:
java.io.IOException - On problems creating a connection to the specified Total Recall VR system. See cause for details.
Method Detail

isAuthorized

public boolean isAuthorized()
Test if the user is authorised for SCP operations after establishing a connection to a Total Recall VR system.

Returns:
true if the user is authorised.false otherwise.

close

public void close()
Closes the SCP connection to a TOTAL recall system.


getRemoteFile

public void getRemoteFile(java.lang.String remoteFileName,
                          java.lang.String localDirName)
                   throws java.io.IOException
Copies a file from the Total Recall VR system to a local directory.

Parameters:
remoteFileName - Fully qualified name of the file on the Total Recall VR system.
localDirName - Fully qualified name of the local directory.
Throws:
java.io.IOException - On any problem that is associated with completing the request. See cause for further details on the problem.

getRemoteFiles

public void getRemoteFiles(java.lang.String[] remoteFileNames,
                           java.lang.String localDirName)
                    throws java.io.IOException
Copies a set of files from the Total Recall VR system to a local directory.

Parameters:
remoteFileNames - Fully qualified names of the files on the Total Recall VR system.
localDirName - Fully qualified name of the local directory.
Throws:
java.io.IOException - On any problem that is associated with completing the request. See cause for further details on the problem.

putLocalFile

public void putLocalFile(java.lang.String localFileName,
                         java.lang.String remoteDirName,
                         java.lang.String mode)
                  throws java.io.IOException
Copies a local file to the Total Recall VR system.

Parameters:
localFileName - Fully qualified name of the local file.
remoteDirName - Fully qualified name of the directory on the Total Recall VR system.
mode - A four digit string which represents the access mode of the file on the Total Recall VR system. For example 0644.
Throws:
java.io.IOException - On any problem that is associated with completing the request. See cause for further details on the problem.

getAsRemoteFile

public void getAsRemoteFile(java.lang.String remoteFileName,
                            java.lang.String localFileName)
                     throws java.io.IOException
Copies a file from the Total Recall VR system to a local file with a different file name than the name of the file on the Total Recall VR system.

Parameters:
remoteFileName - Fully qualified name of the file on the Total Recall VR system.
localFileName - Fully qualified name of the local file.
Throws:
java.io.IOException - On any problem that is associated with completing the request. See cause for further details on the problem.

putAsLocalFile

public void putAsLocalFile(java.lang.String localFileName,
                           java.lang.String remoteFileName,
                           java.lang.String mode)
                    throws java.io.IOException
Copies a local file to the Total Recall VR system with a different file name than the name of the local file.

Parameters:
localFileName - Fully qualified name of the local file.
remoteFileName - Fully qualified name of the file on the Total Recall VR system.
mode - A four digit string which represents the access mode of the file on the Total Recall VR system. For example 0644.
Throws:
java.io.IOException - On any problem that is associated with completing the request. See cause for further details on the problem.


Copyright ©, 2005-2012 Prolancer Pty Ltd, Sydney Australia.