public class Filetransfer extends AbstractImplementation implements ExecutableIF
Argument Keyword | Datatype | Default | Description |
---|---|---|---|
TargetRef | String | none | The name of reference to the target ASAM ODS session. |
UseSocket | boolean | true | This value is used to decide whether to use sockets to transport the data files. |
SocketPort | Integer | 6900 | If the transport is configured to use sockets, this property specifies the port number that should be used. |
Dir | String | none | The directory that is the root for that operation. The zip entries will be added relative to that point. If this argument is not available, the argument Filename must be specified. |
Filename | String | none | The filename to be transfered. This parameter is meaningful only if the argument Dir is not available. |
prefix | String | none | An optional server side subdirectory. |
CORBAFileServer.* | String | none | All arguments will be passed to the StreamFactory instance. So the CORBAFileServer settings can be specified here. |
deleteaftertransfer | Boolean | false | Set this value to true to delete file after transfer on the client. |
Modifier and Type | Field and Description |
---|---|
protected boolean |
deleteAfterTransfer |
protected java.lang.String |
dir |
protected java.lang.String |
filename |
protected static java.lang.String |
LOGGER_NAME |
protected int |
socketPort |
protected boolean |
useSocket |
arguments, ctx, descriptor, NEW_LINE
Constructor and Description |
---|
Filetransfer() |
Modifier and Type | Method and Description |
---|---|
void |
execute()
Execute the termination.
|
java.io.FileFilter |
getFileFilter()
Get the file filter to check files for transfer.
|
java.io.File[] |
getFiles()
Get all the file to be a part of the zip file.
|
protected void |
getFiles(java.util.Vector<java.io.File> vec,
java.io.File dir,
java.io.FileFilter filter)
Get all the file to be a part of the zip file.
|
protected AoSession |
getSession()
Get the session.
|
protected java.lang.String |
getSubDir(java.io.File file)
Get the sub folder name for the given file.
|
void |
init()
Initialize the termination.
|
void |
saveLocations(java.io.File[] localFiles,
java.lang.String[] locations)
Save the locations.
|
void |
setArguments(java.util.Properties args)
Set argument property map.
|
void |
terminate()
Terminate the termination.
|
addAttributesToNameValueUnitArray, addAttributeToNameValueUnitArray, addStringValueToNameValueUnitArray, checkDirectoy, checkDirectoy, checkDirectoy, checkFile, checkFile, checkFile, checkIntValue, checkStringValue, compressNvuArray, createMessageFromPropertyFile, createMessageFromPropertyFile, createMessageFromPropertyFile, createTsUnionFromObject, deleteRowWithAttributes, getArguments, getContext, getDescriptor, getListFromProperty, getMandatoryProperty, getMandatoryProperty, getMandatoryPropertyAsInt, getMandatoryPropertyAsList, getMandatoryPropertyWithRuleException, getNvuArrayFromMap, getNvuArrayFromMap, getNvuObjectWithName, getNvuObjectWithName, getNvuObjectWithName, getOdsCacheFromProperty, getOptioanlPropertyAsInt, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalProperty, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsBoolean, getOptionalPropertyAsList, makeUpperCaseKeyword, removeAttributeFromNameValueUnitArray, removeAttributeFromNameValueUnitArray, setContext, setDescriptor
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContext, getDescriptor, setContext, setDescriptor
protected static final java.lang.String LOGGER_NAME
protected boolean useSocket
protected int socketPort
protected java.lang.String dir
protected java.lang.String filename
protected boolean deleteAfterTransfer
public void setArguments(java.util.Properties args) throws InvalidArgumentException
setArguments
in interface ImplementationIF
setArguments
in class AbstractImplementation
arguments
- the property mapInvalidArgumentException
- if the arguments are not valid.public void execute() throws ExecutableException
execute
in interface ExecutableIF
ExecutableException
- if execution fails.public void saveLocations(java.io.File[] localFiles, java.lang.String[] locations) throws ExecutableException
localFiles
- The array containing the local file descriptors.locations
- The array containing the values returns by the server.ExecutableException
- if something is wrong.public java.io.File[] getFiles()
protected void getFiles(java.util.Vector<java.io.File> vec, java.io.File dir, java.io.FileFilter filter)
public java.io.FileFilter getFileFilter()
protected java.lang.String getSubDir(java.io.File file)
file
- the trigger file.public void terminate() throws TerminationException
terminate
in interface ExecutableIF
TerminationException
- if termination fails.public void init() throws InitializationFailedException
init
in interface ImplementationIF
init
in class AbstractImplementation
InitializationFailedException
- if the initialization fails.protected AoSession getSession()