|
Class: URITransmissionService
Object
|
+--URITransmissionService
- Package:
- stx:goodies/communication
- Category:
- Net-Communication-URI
- Version:
- rev:
1.24
date: 2023/12/08 13:10:35
- user: cg
- file: URITransmissionService.st directory: goodies/communication
- module: stx stc-classLibrary: communication
documentation to be added.
[instance variables:]
[class variables:]
copyrightCOPYRIGHT (c) 2003 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
default settings
-
secondsForTimerAction
-
Returnd the seconds about the interval refered to the timer action
instance creation
-
fromFile: aFileName monitoring: aBoolean onErrorHandle: anErrorHandleBlock
-
self fromFile:'/home/tm/pcsmd/config/fileTransmission/serviceConfiguration'
monitoring:false
onErrorHandle:[:ex| Transcript showCR:ex description ]
-
fromFile: aFileName monitoring: aBoolean onErrorHandle: anErrorHandleBlock transmissionInfoHolder: aTransmissionInfoHolder
-
self fromFile:'/home/tm/pcsmd/config/fileTransmission/serviceConfiguration'
monitoring:true
onErrorHandle:[:ex| Transcript showCR:ex description ]
transmissionInfoHolder:[:info| Transcript showCR:info ]
-
fromFile: aFileName onErrorHandle: anErrorHandleBlock transmissionInfoHolder: aTransmissionInfoHolder
-
self fromFile:'/home/tm/pcsmd/config/fileTransmission/serviceConfiguration'
onErrorHandle:[:ex| Transcript showCR:ex description ]
transmissionInfoHolder:[:info| Transcript showCR:info ]
-
fromString: aString onErrorHandle: anErrorHandleBlock transmissionInfoHolder: aTransmissionInfoHolder
-
self fromString:'file:/phys/exept/home/tm/tmp file:/home/tm/test'
onErrorHandle:[:ex| Transcript showCR:ex description ]
transmissionInfoHolder:[:info| Transcript showCR:info value ]
reading
-
transmissionListFromFile: aFileName
-
-
transmissionListFromFile: aFileName onError: aThreArgBlock
-
list of Strings
Usage example(s):
|list|
Error handle:[:ex| self halt.
Transcript showCR:ex description.
ex proceed.
] do:[
list := self transmissionListFromFile:'~/pcsmd/config/fileTransfer'
].
list
|
accessing
-
fileName
-
return the value of the instance variable 'fileName' (automatically generated)
-
fileName: aFileName
-
set the value of the instance variable 'fileName' (automatically generated)
-
monitoring
-
return the value of the instance variable 'monitoring' (automatically generated)
-
monitoring: aBoolean
-
if true;
reset transmissions read from fileName,
after each processing-loop about the transmissions
-
onErrorBlock
-
get the value of the instance variable 'errorHandler' (automatically generated)
-
onErrorBlock: aOneArgBlock
-
set the value of the instance variable 'errorHandler' (automatically generated)
-
timerProcess
-
return the value of the instance variable 'timerProcess' (automatically generated)
-
transmissionInfoHolder: aValueHolder
-
set the value of the instance variable 'transmissionInfoHolder' (automatically generated)
-
transmissions
-
return the value of the instance variable 'transmissions' (automatically generated)
-
transmissions: aTransmissionList
-
set the value of the instance variable 'transmissions' (automatically generated)
processing
-
doTimerActions
-
-
startService
-
start a sub-process to invoke timer actions cyclic here
Usage example(s):
URITransmissionService new startService
|
-
terminateService
-
terminate the sub-process about the timer actions
Usage example(s):
URITransmissionService new terminateService
|
-
transmissionsCriticalDo: aBlock
-
do operate with RecursionLock on transmissions
queries
-
state
-
validation
-
evaluateFile
-
ignore non-existing files or files not due to be evaluated
|description transmissions service|
description := 'file:/tmp/test/transmission.txt
file:/home/tm/tmp/transmission.txt
file:/home/tm/tmp/sent'
asCollectionOfWords.
service := URITransmissionService new.
service transmissions:transmissions.
service onErrorBlock:[:ex| Transcript showCR:ex description ].
service transmissionInfoHolder:[:info| Transcript showCR:info value]
service startService.
Delay waitForSeconds:10.
service terminateService.
|
|service|
service := self fromString:'file:/phys/exept/home/tm/tmp /home/tm/test'
onErrorHandle:[:ex| Transcript showCR:ex description ]
transmissionInfoHolder:[:info| Transcript showCR:info value].
Delay waitForSeconds:30.
service terminateService.
|
|service|
service := self fromFile:'/home/tm/pcsmd/config/fileTransmission/serviceConfiguration'
monitoring:true
onErrorHandle:[:ex| Transcript showCR:ex description ]
transmissionInfoHolder:[:info| Transcript showCR:info value].
Delay waitForSeconds:30.
service terminateService.
|