|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.twg.filetransfer.FileSource
com.tivoli.twg.filetransfer.FSAgent
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 |
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 |
protected java.lang.String destinationAddress
protected java.lang.Object LOCK
Constructor Detail |
public FSAgent(long moid, java.lang.String ipcPath) throws FTException
public FSAgent(java.lang.String ipcPath) throws FTException
public FSAgent(long moid, java.lang.String ipcPath, boolean getRemoteDrives) throws FTException
public FSAgent(java.lang.String ipcPath, boolean getRemoteDrives) throws FTException
Method Detail |
public void init() throws FTException
FTException
public void setHostname(java.lang.String host)
setHostname
in class FileSource
public java.lang.String getHostname()
getHostname
in class FileSource
public java.lang.String getDestinationAddress()
public float getVersion()
public int getType()
public int getFileSourceState()
getFileSourceState
in class FileSource
public boolean negotiate() throws FTException
FTException
public void refresh() throws FTException
refresh
in class FileSource
FTException
public void getRemoteDrives() throws FTException
FTException
public boolean getDirectoryTree(FSTObject parent) throws FTException
getDirectoryTree
in class FileSource
parent
- the node to get file system info for
FTException
public FSTObject[] getRootLevel() throws FTException
getRootLevel
in class FileSource
FTException
public boolean exists(java.lang.String filename) throws FTException
exists
in class FileSource
FTException
public boolean isFile(java.lang.String filename) throws FTException
isFile
in class FileSource
FTException
public boolean isDirectory(java.lang.String filename) throws FTException
isDirectory
in class FileSource
FTException
public boolean isAbsolute(java.lang.String filename)
isAbsolute
in class FileSource
public boolean canWrite(java.lang.String filename) throws FTException
canWrite
in class FileSource
FTException
public boolean canWrite(FSTObject file) throws FTException
canWrite
in class FileSource
FTException
public boolean canRead(java.lang.String filename) throws FTException
canRead
in class FileSource
FTException
public boolean canRead(FSTObject file) throws FTException
canRead
in class FileSource
FTException
public boolean deleteFile(java.lang.String filename) throws FTException
deleteFile
in class FileSource
FTException
public boolean deleteFile(FSTObject file) throws FTException
deleteFile
in class FileSource
FTException
public long getFileSize(java.lang.String filename) throws FTException
getFileSize
in class FileSource
FTException
public long getFileSize(FSTObject file) throws FTException
getFileSize
in class FileSource
FTException
public boolean mkdir(java.lang.String directoryName) throws FTException
mkdir
in class FileSource
FTException
public boolean mkdir(java.lang.String directoryName, FileAttrs attributes) throws FTException
mkdir
in class FileSource
FTException
public boolean mkdir(FSTObject directory) throws FTException
mkdir
in class FileSource
FTException
public boolean renameFile(java.lang.String originalFilename, java.lang.String newFilename) throws FTException
renameFile
in class FileSource
FTException
public boolean renameFile(FSTObject file, java.lang.String newFilename) throws FTException
renameFile
in class FileSource
FTException
public java.io.InputStream getInputStream(java.lang.String filename) throws FTException
getInputStream
in class FileSource
FTException
public java.io.InputStream getInputStream(FSTObject file) throws FTException
getInputStream
in class FileSource
FTException
public java.io.OutputStream getOutputStream(java.lang.String filename) throws FTException
getOutputStream
in class FileSource
FTException
public java.io.OutputStream getOutputStream(FSTObject file) throws FTException
getOutputStream
in class FileSource
FTException
public FileAttrs getFileAttributes(java.lang.String filename) throws FTException
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.
getFileAttributes
in class FileSource
FTException
public FileAttrs getFileAttributes(FSTObject file) throws FTException
getFileAttributes
in class FileSource
FTException
public boolean rmdir(java.lang.String directoryName) throws FTException
FTException
public boolean rmdir(FSTObject directory) throws FTException
FTException
public java.lang.String getDriveDelimiter()
getDriveDelimiter
in class FileSource
public java.lang.String getPathDelimiter()
getPathDelimiter
in class FileSource
public java.lang.String getNameDelimiter()
getNameDelimiter
in class FileSource
public java.lang.String getRootDelimiter()
getRootDelimiter
in class FileSource
public java.lang.String getSearchString()
getSearchString
in class FileSource
public java.lang.String getDefaultEncoding()
getDefaultEncoding
in class FileSource
public int getCompressionSupportLevel()
public void setRequestedCompression(int level)
public int getRequestedCompression()
public void cleanup() throws FTException
cleanup
in class FileSource
FTException
public void taskActivationComplete(long rc, long localID, long remoteID, java.lang.String taskID, long toid, java.lang.String subtaskID, LongValueSet moid, LongValueSet foid)
taskActivationComplete
in interface RemoteTaskActivatorListener
rc
- result code (see TWGTaskConstants.RETURN_* for valueslocalID
- the id passed into the TWGRemoteTaskManager.subtaskActivate()
callremoteID
- 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 taskIDtoid
- the object ID of the task that was activatedsubtaskID
- the string subtaskID of the subtask that was activatedmoid
- the moid passed on the subtaskActivate() callfoid
- the foid passed on the subtaskActivate() callpublic void taskActivationEnded(int rc, long localID)
taskActivationEnded
in interface RemoteTaskActivatorListener
rc
- reason the activation ended (see TWGTaskConstants.ACT_STATUS_*)localID
- the id passed into the TWGRemoteTaskManager.subtaskActivate()
callpublic boolean launchDirectedSend(FileSource targetSrc, FSTObject source, FSTObject target, java.lang.String ipcPath, int type) throws FTException
FTException
public boolean launchDirectedGet(FileSource sourceSrc, FSTObject source, FSTObject target, FSAgent targetSrc, int type) throws FTException
FTException
public java.lang.String getRegStringValue(java.lang.String keyName, java.lang.String valueName) throws FTException
getRegStringValue
in class FileSource
FTException
public byte[] getRegBytesValue(java.lang.String keyName, java.lang.String valueName) throws FTException
getRegBytesValue
in class FileSource
FTException
public int getRegIntValue(java.lang.String keyName, java.lang.String valueName) throws FTException
getRegIntValue
in class FileSource
FTException
public java.lang.String getEnvironmentVariable(java.lang.String varName) throws FTException
getEnvironmentVariable
in class FileSource
FTException
public int requestAccess(java.lang.String uid, java.lang.String pwd) throws FTException
FTException
public void CommandComplete(Command cmd)
CommandComplete
in interface CommandCompleteListener
cmd
- - Command instance of command which has completedpublic Command buildStatelessRemoteCommand(int cmdId, java.lang.String filename)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |