com.tivoli.twg.filetransfer
Class FSAgent

java.lang.Object
  extended bycom.tivoli.twg.filetransfer.FileSource
      extended bycom.tivoli.twg.filetransfer.FSAgent
All Implemented Interfaces:
CommandCompleteListener, FTConstants, RemoteTaskActivatorListener
Direct Known Subclasses:
FSServer, FSServerV1

public class FSAgent
extends FileSource
implements FTConstants, RemoteTaskActivatorListener, CommandCompleteListener

Console or Local implementation of FileSource. This is a generic wrapper for local file access.


Field Summary
protected  java.lang.String destinationAddress
          The destination address of the agent.
protected  java.lang.Object LOCK
          Lock to wait until task activation is complete.
 
Fields inherited from class com.tivoli.twg.filetransfer.FileSource
FSServiceNode
 
Fields inherited from interface com.tivoli.twg.filetransfer.FTConstants
ADDRESS_DELIMITER, AGENT, AMBIGUOUS, ATSET_ERR, ATTRIBUTE_ERR, BASE_DEAD, BC_TYPE_BEST_COMPRESSION, BC_TYPE_BEST_SPEED, BC_TYPE_DEFAULT_COMPRESSION, BC_TYPE_UNCOMP, CANCEL_TRANSFER_FAILED, CLEANUP, COMMUNICATION_EXCEPTION, COMPRESSION_FAILED, CONSOLE, DECOMPRESSION_FAILED, DEFAULT_BUFFER_SIZE, DEFAULT_DRIVE_DELIMITER, DEFAULT_MAXIMUM_BUFFER_SIZE, DEFAULT_NAME_DELIMITER, DEFAULT_PATH_DELIMITER, DEFAULT_ROOT, DEFAULT_SEARCH_STRING, DEFAULT_TIMEOUT, DIR_DELETE_ERROR, DIRECTORY_SYSTEM, DISK_ACCESS, DOSCLOSE_ERR, DOSCREATEDIR_FAIL, DOSDELETE_FAIL, DOSFINDDIRS_FAIL, DOSOPENS_ERR, DOSOPENS_FAIL, DOSOPENT_ERR, DOSOPENT_FAIL, DOSREAD_ERR, DOSREAD_FAIL, DOSREADONLY_ERR, D OSSETCURRENT_FAIL, DOSWRITE_ERR, DOSWRITE_FAIL, DRIVE_SIZE, DRIVE_SYSTEM, FILE_DELETE_ERROR, FILE_NOT_FOUND, FILE_PTR_ERR, FILE_QUERY_FAIL, FILE_SET_FAIL, FILE_SIZE_MISMATCH, FILE_SOURCE_READY, FILE_SOURCE_UNAVAILABLE, FILE_TRANSFER_BASE_DIRECTORY_ALREADY_EXISTS, FILE_TRANSFER_BASE_DIRECTORY_DOES_NOT_EXIST, FILE_TRANSFER_BASE_DIRECTORY_NOT_EMPTY, FILE_TRANSFER_BASE_FILE_NOT_FOUND, FILE_TRANSFER_BASE_INSUFFICIENT_STORAGE, FILE_TRANSFER_BASE_INVALID_PARAMETER, FILE_TRANSFER_BASE_MKDIR_FAILED, FILE_TRANSFER_BASE_NOT_AUTHORIZED, FILE_TRANSFER_BASE_OPEN_FAILED, FILE_TRANSFER_BASE_RMDIR_FAILED, FILE_TRANSFER_BASE_SUCCESS, FILE_TRANSFER_BASE_SYSTEM_NOT_AVAILABLE, FILE_TRANSFER_BASE_TIME_OUT, FILE_TRANSFER_BASE_UNEXPECTED_ERROR, FIRST_CHUNK, FS_QUERY_FAIL, GENERAL_EXCEPTION, GENERIC_FAILURE, INIT_FAIL, INITIALIZING_FILE_SOURCE, INSUFFICIENT_INPUT_PARMS, INTERRUPTED_EXCEPTION, INVALID_COMMAND, INVALID_DIR_QUERY1, INVALID_DIR_QUERY2, INVALID_DIR_QUERY3, INVALID_DIR_QUERY4, INVALID_DIR_SET1, INVALID_DIR_SET2, INVALID_DIR_SET3, INVALID_DIR_SET4, INVALID_DIR_SET5, INVALID_DIR_SET6, INVALID_INPUT_PARM, INVALID_PARM_EXCEPTION, IO_EXCEPTION, LAST_CHUNK, MAXIMUM_BUFFER_SIZE, MEMORY_CONSTRAINED, MIDDLE_CHUNK, MKDIR_FAILED, NEED_MORE_INFO, NO_FILESIZE, NO_FILESIZE_FAIL, NOT_ENOUGH_ROOM, NUMBER_SEND_RETRIES, ONLY_CHUNK, OPEN_FAILED, POSTATTRIBUTE_ERR, PREATTRIBUTE_ERR, QUERY_DISK_FAIL, RECEIVE_DIR_ERR, REG_BINARY, REG_DWORD, REG_DWORD_BIG_ENDIAN, REG_DWORD_LITTLE_ENDIAN, REG_EXPAND_SZ, REG_NONE, REG_SZ, REMOVE_FILE_FAILED, REMXCOPY_FAIL, REQUEST_ACCESS, RESULT_BAD_PWD_LEN, RESULT_FAILED, RESULT_NOT_ACCESSABLE, RESULT_NOT_AUTHORIZED, RESULT_NOT_AVAIL, RESULT_OK, RESULT_UNSUPPORTED, RMDIR_FAILED, SECURITY_EXCEPTION, SEEK_FAILED, SEM_FAIL, SEM_TIMEOUT, SERVER, SERVICE_ACTIVATION_EXCEPTION, SERVICENODE_EXCEPTION, SET_DISK_FAIL, SORRY_IN_USE, START_AGENT_TASK_NAME, STATELESS_CANCEL_DIRECTED, STATELESS_CLEANUP_SCAN, STATELESS_CLEANUP_SCAN2, STATELESS_DELETE_FILE, STATELESS_DIR_LIST, STATELESS_DIRECTED_GET, STATELESS_DIRECTED_GET_SIZE, STATELESS_DIRECTED_GET_SIZE2, STATELESS_DIRECTED_GET2, STATELESS_DIRECTED_SEND, STATELESS_DIRECTED_SEND2, STATELESS_FILE_LIST, STATELESS_GET_ATTRIBS, STATELESS_GET_ATTRIBS2, STATELESS_GET_DRIVE_INFO, STATELESS_GET_ENV, STATELESS_GET_REG, STATELESS_INIT, STATELESS_MKDIR, STATELESS_NEGOTIATE, STATELESS_RECV_FILE, STATELESS_RECV_FILE2, STATELESS_RENAME_FILE, STATELESS_RMDIR, STATELESS_SEND_FILE, STATELESS_SEND_FILE2, SUB_DELETE_ERROR, SYSTEM_SECURED, TASK_ID, TIMEOUT, TOO_MANY, TRANSFER_SIZE_MISMATCH, TWG_FILE_TRANSFER_BASE, TWG_SERVICE_MANAGER, UNINITIALIZED_FILE_SOURCE, V1_CAN_WRITE, V1_CLIENT_SN_NAME, V1_DELETE_LOCAL_FILES, V1_DOES_DIR_EXIST, V1_DOES_FILE_EXIST, V1_FAILURE, V1_FILE_NOT_FOUND, V1_FILE_TOO_LARGE, V1_FILL_DIRECTORY, V1_GET_DRIVES, V1_GET_LOCAL_PROPERTIES, V1_GET_REMOTE_FILES, V1_IO_EXCEPTION, V1_IS_ABSOLUTE, V1_IS_DIRECTORY, V1_IS_DRIVE_SYSTEM, V1_MAKE_LOCAL_DIRECTORY, V1_MAX_READ_WRITE_FILE_SIZE, V1_PUT_LOCAL_FILES, V1_READ_FILE, V1_REGISTRY_ ERROR, V1_SERVER, V1_SERVER_SN_NAME, V1_SOURCE_IS_DRIVE_SYSTEM, V1_SOURCE_NOT_DRIVE_SYSTEM, V1_SUCCESS, V1_WRITE_FILE, VERSION_121
 
Constructor Summary
FSAgent(long moid, java.lang.String ipcPath)
          Constructor.
FSAgent(long moid, java.lang.String ipcPath, boolean getRemoteDrives)
          Constructor.
FSAgent(java.lang.String ipcPath)
          Constructor.
FSAgent(java.lang.String ipcPath, boolean getRemoteDrives)
          Constructor.
 
Method Summary
 Command buildStatelessRemoteCommand(int cmdId, java.lang.String filename)
          Biulds command with id: cmdId and common destination address in the form of: inputParm[0] = drive letter inputParm[1] = path inputParm[2] = file
 boolean canRead(FSTObject file)
          Determines whether the specified filename can be read.
 boolean canRead(java.lang.String filename)
          Determines whether the specified filename can be read.
 boolean canWrite(FSTObject file)
          Determines whether the filename can be written to.
 boolean canWrite(java.lang.String filename)
          Determines whether the filename can be written to.
 void cleanup()
          Do all neccessary clean up here.
 void CommandComplete(Command cmd)
          Implements CommandCompleteListener.
 boolean deleteFile(FSTObject file)
          Deletes the specified file.
 boolean deleteFile(java.lang.String filename)
          Deletes the specified file.
 boolean exists(java.lang.String filename)
          Determines if the specified filename exists on the File Source.
 int getCompressionSupportLevel()
          Returns the maximum Compression Level supported by the agent.
 java.lang.String getDefaultEncoding()
          Returns the default codepage to use for file streams.
 java.lang.String getDestinationAddress()
          Returns the destination address this file source represents.
 boolean getDirectoryTree(FSTObject parent)
          Returns an updated FSTObject for a directory.
 java.lang.String getDriveDelimiter()
          Get the default drive delimiter of this file source.
 java.lang.String getEnvironmentVariable(java.lang.String varName)
          Get an environment variable from the file source.
 FileAttrs getFileAttributes(FSTObject file)
          Get a FileAttrs object populated with the attributes of the specified file.
 FileAttrs getFileAttributes(java.lang.String filename)
          Get a FileAttrs object populated with the attributes of the specified file.
 long getFileSize(FSTObject file)
          Retrieves the file size of the specified file.
 long getFileSize(java.lang.String filename)
          Retrieves the file size of the specified file.
 int getFileSourceState()
          Get the state of filesource initialization.
 java.lang.String getHostname()
          Get the hostname.
 java.io.InputStream getInputStream(FSTObject file)
          Returns an InputStream for the specified file.
 java.io.InputStream getInputStream(java.lang.String filename)
          Returns an InputStream for the specified file.
 java.lang.String getNameDelimiter()
          Get the default name delimiter of this file source.
 java.io.OutputStream getOutputStream(FSTObject file)
          Returns an OutputStream for the specified file.
 java.io.OutputStream getOutputStream(java.lang.String filename)
          Returns an OutputStream for the specified file.
 java.lang.String getPathDelimiter()
          Get the default path delimiter of this file source.
 byte[] getRegBytesValue(java.lang.String keyName, java.lang.String valueName)
          Get a registry value of type byte[] from the file source.
 int getRegIntValue(java.lang.String keyName, java.lang.String valueName)
          Get a registry value of type int from the file source.
 java.lang.String getRegStringValue(java.lang.String keyName, java.lang.String valueName)
          Get a registry value of type String from the file source.
 void getRemoteDrives()
          Refreshes the file source drive list.
 int getRequestedCompression()
           
 java.lang.String getRootDelimiter()
          Get the default root delimiter of this file source.
 FSTObject[] getRootLevel()
          Get the root level of the file source (e.g.
 java.lang.String getSearchString()
          Get the default search string of this file source.
 int getType()
          Get the type, of the source, DRIVE_SYSTEM, DIRECTORY_SYSTEM.
 float getVersion()
          Get the IBM Director Agent Version returns a float.
 void init()
           
 boolean isAbsolute(java.lang.String filename)
          Determines whether the filename is an absolute path.
 boolean isDirectory(java.lang.String filename)
          Determines if the specified filename exists, and is a DIRECTORY, rather than a FILE.
 boolean isFile(java.lang.String filename)
          Determines if the specified filename exists, and is a FILE, rather than a DIRECTORY.
 boolean launchDirectedGet(FileSource sourceSrc, FSTObject source, FSTObject target, FSAgent targetSrc, int type)
          launch a directed get on the file source system.
 boolean launchDirectedSend(FileSource targetSrc, FSTObject source, FSTObject target, java.lang.String ipcPath, int type)
          launch a directed send on the file source system.
 boolean mkdir(FSTObject directory)
          Creates the specified directory.
 boolean mkdir(java.lang.String directoryName)
          Creates the specified directory.
 boolean mkdir(java.lang.String directoryName, FileAttrs attributes)
          Creates the specified directory.
 boolean negotiate()
          Handshaking command with File Source to get default path delimiter, etc.
 void refresh()
          Refreshes the file source drive list.
 boolean renameFile(FSTObject file, java.lang.String newFilename)
          Renames the specified file to newFilename.
 boolean renameFile(java.lang.String originalFilename, java.lang.String newFilename)
          Renames the specified file to newFilename.
 int requestAccess(java.lang.String uid, java.lang.String pwd)
          Request access to the agent represented by this source.
 boolean rmdir(FSTObject directory)
          Delete the specified directory.
 boolean rmdir(java.lang.String directoryName)
          Delete the specified directory.
 void setHostname(java.lang.String host)
          Set the hostname.
 void setRequestedCompression(int level)
           
 void taskActivationComplete(long rc, long localID, long remoteID, java.lang.String taskID, long toid, java.lang.String subtaskID, LongValueSet moid, LongValueSet foid)
          Called after the task has finished launching.
 void taskActivationEnded(int rc, long localID)
          notifiy the locks waiting on this complete.
 
Methods inherited from class com.tivoli.twg.filetransfer.FileSource
getFiletransferVersion, hasServerFSAccess, removeFSServiceNodeUse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

destinationAddress

protected java.lang.String destinationAddress
The destination address of the agent. (IPCPath).


LOCK

protected java.lang.Object LOCK
Lock to wait until task activation is complete.

Constructor Detail

FSAgent

public FSAgent(long moid,
               java.lang.String ipcPath)
        throws FTException
Constructor. Initializes agent for moid/ipcPath provided.


FSAgent

public FSAgent(java.lang.String ipcPath)
        throws FTException
Constructor. Initializes agent for ipcPath provided.


FSAgent

public FSAgent(long moid,
               java.lang.String ipcPath,
               boolean getRemoteDrives)
        throws FTException
Constructor. Initializes agent for moid/ipcPath provided.


FSAgent

public FSAgent(java.lang.String ipcPath,
               boolean getRemoteDrives)
        throws FTException
Constructor. Initializes agent for moid/ipcPath provided.

Method Detail

init

public void init()
          throws FTException
Throws:
FTException

setHostname

public void setHostname(java.lang.String host)
Set the hostname.

Specified by:
setHostname in class FileSource

getHostname

public java.lang.String getHostname()
Get the hostname.

Specified by:
getHostname in class FileSource

getDestinationAddress

public java.lang.String getDestinationAddress()
Returns the destination address this file source represents. null if this is local.


getVersion

public float getVersion()
Get the IBM Director Agent Version returns a float.


getType

public int getType()
Get the type, of the source, DRIVE_SYSTEM, DIRECTORY_SYSTEM.


getFileSourceState

public int getFileSourceState()
Get the state of filesource initialization.

Specified by:
getFileSourceState in class FileSource
Returns:
int - one of: FTConstants.UNINITIALIZED_FILE_SOURCE FTConstants.INITIALIZING_FILE_SOURCE FTConstants.FILE_SOURCE_READY FTConstants.FILE_SOURCE_UNAVAILABLE

negotiate

public boolean negotiate()
                  throws FTException
Handshaking command with File Source to get default path delimiter, etc.

Returns:
boolean - true if the File Source accepts this command.
Throws:
FTException

refresh

public void refresh()
             throws FTException
Refreshes the file source drive list.

Specified by:
refresh in class FileSource
Throws:
FTException

getRemoteDrives

public void getRemoteDrives()
                     throws FTException
Refreshes the file source drive list. Currently unused.

Throws:
FTException

getDirectoryTree

public boolean getDirectoryTree(FSTObject parent)
                         throws FTException
Returns an updated FSTObject for a directory.

Specified by:
getDirectoryTree in class FileSource
Parameters:
parent - the node to get file system info for
Returns:
boolean - true if direcotory has children.
Throws:
FTException

getRootLevel

public FSTObject[] getRootLevel()
                         throws FTException
Get the root level of the file source (e.g. list of drives).

Specified by:
getRootLevel in class FileSource
Returns:
FSTObject[] - array of FSTObjects representing the root directory directory. It should be populated with direct children (files and dirs).
Throws:
FTException

exists

public boolean exists(java.lang.String filename)
               throws FTException
Determines if the specified filename exists on the File Source.

Specified by:
exists in class FileSource
Returns:
boolean - true if the file exists.
Throws:
FTException

isFile

public boolean isFile(java.lang.String filename)
               throws FTException
Determines if the specified filename exists, and is a FILE, rather than a DIRECTORY.

Specified by:
isFile in class FileSource
Returns:
boolean - true if the file exists and is a file.
Throws:
FTException

isDirectory

public boolean isDirectory(java.lang.String filename)
                    throws FTException
Determines if the specified filename exists, and is a DIRECTORY, rather than a FILE.

Specified by:
isDirectory in class FileSource
Returns:
boolean - true if the directory exists and is a directory.
Throws:
FTException

isAbsolute

public boolean isAbsolute(java.lang.String filename)
Determines whether the filename is an absolute path.

Specified by:
isAbsolute in class FileSource
Returns:
boolean - true if filename is an absolute path.

canWrite

public boolean canWrite(java.lang.String filename)
                 throws FTException
Determines whether the filename can be written to.

Specified by:
canWrite in class FileSource
Returns:
boolean - true if filename is writeable.
Throws:
FTException

canWrite

public boolean canWrite(FSTObject file)
                 throws FTException
Determines whether the filename can be written to.

Specified by:
canWrite in class FileSource
Returns:
boolean - true if filename is writeable.
Throws:
FTException

canRead

public boolean canRead(java.lang.String filename)
                throws FTException
Determines whether the specified filename can be read.

Specified by:
canRead in class FileSource
Returns:
boolean - true if filename is readable.
Throws:
FTException

canRead

public boolean canRead(FSTObject file)
                throws FTException
Determines whether the specified filename can be read.

Specified by:
canRead in class FileSource
Returns:
boolean - true if filename is readable.
Throws:
FTException

deleteFile

public boolean deleteFile(java.lang.String filename)
                   throws FTException
Deletes the specified file.

Specified by:
deleteFile in class FileSource
Returns:
boolean - true if the file was deleted.
Throws:
FTException

deleteFile

public boolean deleteFile(FSTObject file)
                   throws FTException
Deletes the specified file. This one is faster, so if you've got an FSTObject, use it.

Specified by:
deleteFile in class FileSource
Returns:
boolean - true if the file was deleted.
Throws:
FTException

getFileSize

public long getFileSize(java.lang.String filename)
                 throws FTException
Retrieves the file size of the specified file.

Specified by:
getFileSize in class FileSource
Returns:
long - size of the file, in bytes.
Throws:
FTException

getFileSize

public long getFileSize(FSTObject file)
                 throws FTException
Retrieves the file size of the specified file.

Specified by:
getFileSize in class FileSource
Returns:
long - size of the file, in bytes.
Throws:
FTException

mkdir

public boolean mkdir(java.lang.String directoryName)
              throws FTException
Creates the specified directory.

Specified by:
mkdir in class FileSource
Returns:
boolean - true if directory creation was successful.
Throws:
FTException

mkdir

public boolean mkdir(java.lang.String directoryName,
                     FileAttrs attributes)
              throws FTException
Creates the specified directory.

Specified by:
mkdir in class FileSource
Returns:
boolean - true if directory creation was successful.
Throws:
FTException

mkdir

public boolean mkdir(FSTObject directory)
              throws FTException
Creates the specified directory.

Specified by:
mkdir in class FileSource
Returns:
boolean - true if directory creation was successful.
Throws:
FTException

renameFile

public boolean renameFile(java.lang.String originalFilename,
                          java.lang.String newFilename)
                   throws FTException
Renames the specified file to newFilename.

Specified by:
renameFile in class FileSource
Returns:
boolean - true if rename was successful.
Throws:
FTException

renameFile

public boolean renameFile(FSTObject file,
                          java.lang.String newFilename)
                   throws FTException
Renames the specified file to newFilename.

Specified by:
renameFile in class FileSource
Returns:
boolean - true if rename was successful.
Throws:
FTException

getInputStream

public java.io.InputStream getInputStream(java.lang.String filename)
                                   throws FTException
Returns an InputStream for the specified file.

Specified by:
getInputStream in class FileSource
Returns:
InputStream - stream from the specified file.
Throws:
FTException

getInputStream

public java.io.InputStream getInputStream(FSTObject file)
                                   throws FTException
Returns an InputStream for the specified file.

Specified by:
getInputStream in class FileSource
Returns:
InputStream - stream from the specified file.
Throws:
FTException

getOutputStream

public java.io.OutputStream getOutputStream(java.lang.String filename)
                                     throws FTException
Returns an OutputStream for the specified file.

Specified by:
getOutputStream in class FileSource
Returns:
OutputStream - stream to the specified file.
Throws:
FTException

getOutputStream

public java.io.OutputStream getOutputStream(FSTObject file)
                                     throws FTException
Returns an OutputStream for the specified file.

Specified by:
getOutputStream in class FileSource
Returns:
OutputStream - stream to the specified file.
Throws:
FTException

getFileAttributes

public FileAttrs getFileAttributes(java.lang.String filename)
                            throws FTException
Get a FileAttrs object populated with the attributes of the specified file.

Note: The date returned by getFileAttributes will be in GMT (UTC). you will need to convert it to the appropriate timezone before setting the filetime or displaying.

Specified by:
getFileAttributes in class FileSource
Returns:
FileAttrs - File Attributes of the specified file. In GMT.
Throws:
FTException

getFileAttributes

public FileAttrs getFileAttributes(FSTObject file)
                            throws FTException
Get a FileAttrs object populated with the attributes of the specified file.

Specified by:
getFileAttributes in class FileSource
Returns:
FileAttrs - File Attributes of the specified file.
Throws:
FTException

rmdir

public boolean rmdir(java.lang.String directoryName)
              throws FTException
Delete the specified directory.

Returns:
boolean - true if the directory remove worked.
Throws:
FTException

rmdir

public boolean rmdir(FSTObject directory)
              throws FTException
Delete the specified directory.

Returns:
boolean - true if the directory remove worked.
Throws:
FTException

getDriveDelimiter

public java.lang.String getDriveDelimiter()
Get the default drive delimiter of this file source.

Specified by:
getDriveDelimiter in class FileSource
Returns:
String - the default drive delimiter.

getPathDelimiter

public java.lang.String getPathDelimiter()
Get the default path delimiter of this file source.

Specified by:
getPathDelimiter in class FileSource
Returns:
String - the path drive delimiter.

getNameDelimiter

public java.lang.String getNameDelimiter()
Get the default name delimiter of this file source.

Specified by:
getNameDelimiter in class FileSource
Returns:
String - the default name delimiter.

getRootDelimiter

public java.lang.String getRootDelimiter()
Get the default root delimiter of this file source.

Specified by:
getRootDelimiter in class FileSource
Returns:
String - the default root delimiter.

getSearchString

public java.lang.String getSearchString()
Get the default search string of this file source.

Specified by:
getSearchString in class FileSource
Returns:
String - the default search string.

getDefaultEncoding

public java.lang.String getDefaultEncoding()
Returns the default codepage to use for file streams.

Specified by:
getDefaultEncoding in class FileSource
Returns:
String - codepage string in the java format.

getCompressionSupportLevel

public int getCompressionSupportLevel()
Returns the maximum Compression Level supported by the agent.

Returns:
int - Compression level supported by agent

setRequestedCompression

public void setRequestedCompression(int level)

getRequestedCompression

public int getRequestedCompression()

cleanup

public void cleanup()
             throws FTException
Do all neccessary clean up here.

Specified by:
cleanup in class FileSource
Throws:
FTException

taskActivationComplete

public void taskActivationComplete(long rc,
                                   long localID,
                                   long remoteID,
                                   java.lang.String taskID,
                                   long toid,
                                   java.lang.String subtaskID,
                                   LongValueSet moid,
                                   LongValueSet foid)
Called after the task has finished launching.

Specified by:
taskActivationComplete in interface RemoteTaskActivatorListener
Parameters:
rc - result code (see TWGTaskConstants.RETURN_* for values
localID - the id passed into the TWGRemoteTaskManager.subtaskActivate() call
remoteID - the activation ID assigned by the server. This is the ID that you must use for subtaskDeactivate()
taskID - the string task ID of the task. This will be null if the subtaskActivate() call was made passing the toid instead of the taskID
toid - the object ID of the task that was activated
subtaskID - the string subtaskID of the subtask that was activated
moid - the moid passed on the subtaskActivate() call
foid - the foid passed on the subtaskActivate() call

taskActivationEnded

public void taskActivationEnded(int rc,
                                long localID)
notifiy the locks waiting on this complete.

Specified by:
taskActivationEnded in interface RemoteTaskActivatorListener
Parameters:
rc - reason the activation ended (see TWGTaskConstants.ACT_STATUS_*)
localID - the id passed into the TWGRemoteTaskManager.subtaskActivate() call

launchDirectedSend

public boolean launchDirectedSend(FileSource targetSrc,
                                  FSTObject source,
                                  FSTObject target,
                                  java.lang.String ipcPath,
                                  int type)
                           throws FTException
launch a directed send on the file source system.

Returns:
boolean - true if launch completed.
Throws:
FTException

launchDirectedGet

public boolean launchDirectedGet(FileSource sourceSrc,
                                 FSTObject source,
                                 FSTObject target,
                                 FSAgent targetSrc,
                                 int type)
                          throws FTException
launch a directed get on the file source system.

Returns:
boolean - true if launch completed.
Throws:
FTException

getRegStringValue

public java.lang.String getRegStringValue(java.lang.String keyName,
                                          java.lang.String valueName)
                                   throws FTException
Get a registry value of type String from the file source.

Specified by:
getRegStringValue in class FileSource
Returns:
String - registry value.
Throws:
FTException

getRegBytesValue

public byte[] getRegBytesValue(java.lang.String keyName,
                               java.lang.String valueName)
                        throws FTException
Get a registry value of type byte[] from the file source.

Specified by:
getRegBytesValue in class FileSource
Returns:
byte[] - registry value.
Throws:
FTException

getRegIntValue

public int getRegIntValue(java.lang.String keyName,
                          java.lang.String valueName)
                   throws FTException
Get a registry value of type int from the file source.

Specified by:
getRegIntValue in class FileSource
Returns:
int - registry value.
Throws:
FTException

getEnvironmentVariable

public java.lang.String getEnvironmentVariable(java.lang.String varName)
                                        throws FTException
Get an environment variable from the file source.

Specified by:
getEnvironmentVariable in class FileSource
Returns:
String - environment variable value.
Throws:
FTException

requestAccess

public int requestAccess(java.lang.String uid,
                         java.lang.String pwd)
                  throws FTException
Request access to the agent represented by this source.

Returns:
true if access was granted.
Throws:
FTException

CommandComplete

public void CommandComplete(Command cmd)
Implements CommandCompleteListener.

Specified by:
CommandComplete in interface CommandCompleteListener
Parameters:
cmd - - Command instance of command which has completed

buildStatelessRemoteCommand

public Command buildStatelessRemoteCommand(int cmdId,
                                           java.lang.String filename)
Biulds command with id: cmdId and common destination address in the form of: inputParm[0] = drive letter inputParm[1] = path inputParm[2] = file