Class WatchFolderAndSend
- java.lang.Object
-
- com.pixelmed.apps.WatchFolderAndSend
-
public class WatchFolderAndSend extends java.lang.ObjectA class for watching a folder and sending any DICOM files that appear to a pre-configured network remote Storage SCP AE.
The class has no public methods other than the constructor and a main method that is useful as a utility.
For example:
java -cp ./pixelmed.jar \ com.pixelmed.apps.WatchFolderAndSend \ watchthisfolder \ graytoo 11112 GRAYTOO_DV_11112or, with a GUI:
java -cp ./pixelmed.jar \ com.pixelmed.apps.WatchFolderAndSend
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classWatchFolderAndSend.OurMultipleInstanceTransferStatusHandlerWithFileName
-
Field Summary
Fields Modifier and Type Field Description protected static intintervalAfterLastModificationWithinWhichDoNotSendFileYetprotected static java.lang.StringlocalnameForRemoteAEprotected static java.lang.StringpropertiesFileNameprotected static java.lang.StringpropertiesFilePathprotected static intsleepTimeBetweenCheckingForFolderContent
-
Constructor Summary
Constructors Constructor Description WatchFolderAndSend(java.lang.String watchedFolderName, java.lang.String remoteHost, int remotePort, java.lang.String remoteAE, java.lang.String localAE, int verbosityLevel, MessageLogger logger)Watch a folder and send any DICOM files that appear to a network remote Storage SCP AE.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static ApplicationEntitygetPropertiesEditInDialogAndSave()static voidmain(java.lang.String[] arg)Watch a folder and send any DICOM files that appear to a network remote Storage SCP AE.
-
-
-
Field Detail
-
sleepTimeBetweenCheckingForFolderContent
protected static int sleepTimeBetweenCheckingForFolderContent
-
intervalAfterLastModificationWithinWhichDoNotSendFileYet
protected static int intervalAfterLastModificationWithinWhichDoNotSendFileYet
-
propertiesFileName
protected static java.lang.String propertiesFileName
-
localnameForRemoteAE
protected static java.lang.String localnameForRemoteAE
-
propertiesFilePath
protected static java.lang.String propertiesFilePath
-
-
Constructor Detail
-
WatchFolderAndSend
public WatchFolderAndSend(java.lang.String watchedFolderName, java.lang.String remoteHost, int remotePort, java.lang.String remoteAE, java.lang.String localAE, int verbosityLevel, MessageLogger logger) throws DicomException, DicomNetworkException, java.io.IOException, java.lang.InterruptedExceptionWatch a folder and send any DICOM files that appear to a network remote Storage SCP AE.
Removes files only after successful send attempt, and leaves them and retries if connection or send fails.
Tries not to send files that are still being modified.
Does NOT RECURSE into sub-folders, only processes file in supplied directory itself.
- Parameters:
watchedFolderName-remoteHost-remotePort-remoteAE-localAE-verbosityLevel- only used if a logger is presentlogger- should only be used for logging to user interface dialogs, otherwise use SLF4J logging levels- Throws:
DicomExceptionDicomNetworkExceptionjava.io.IOExceptionjava.lang.InterruptedException
-
-
Method Detail
-
getPropertiesEditInDialogAndSave
protected static ApplicationEntity getPropertiesEditInDialogAndSave()
-
main
public static void main(java.lang.String[] arg)
Watch a folder and send any DICOM files that appear to a network remote Storage SCP AE.
The verbosity level controls the detail of the logging to a graphical user interface and has not been replaced with calls to the SLF4J logging framework. It is ignored if there is no graphical user interface, in which case messages are sent to the the SLF4J logging framework at the INFO logging level.
- Parameters:
arg- none if parameters are to be requested through a graphical interface, otherwise an array of 4 to 6 strings - the fully qualified path of the watched folder, the remote hostname, remote port, and remote AE Title and optionally our AE Title and a verbosity level of 0 or 1
-
-