eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'URITransmissionService':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: URITransmissionService


Inheritance:

   Object
   |
   +--URITransmissionService

Package:
stx:goodies/communication
Category:
Net-Communication-URI
Version:
rev: 1.20 date: 2010/08/13 13:57:03
user: stefan
file: URITransmissionService.st directory: goodies/communication
module: stx stc-classLibrary: communication
Author:
Timo Merkert (tm@asterix)

Description:


documentation to be added.


[instance variables:]

[class variables:]


Related information:



Class protocol:

default settings
o  secondsForTimerAction
Returnd the seconds about the interval refered to the timer action

instance creation
o  fromFile: aFileName monitoring: aBoolean onErrorHandle: anErrorHandleBlock
self fromFile:'/home/tm/pcsmd/config/fileTransmission/serviceConfiguration'
monitoring:false
onErrorHandle:[:ex| Transcript showCR:ex description ]

o  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 ]

o  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 ]

o  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
o  transmissionListFromFile: aFileName

o  transmissionListFromFile: aFileName onError: aThreArgBlock
list of Strings


Instance protocol:

accessing
o  fileName
return the value of the instance variable 'fileName' (automatically generated)

o  fileName: aFileName
set the value of the instance variable 'fileName' (automatically generated)

o  monitoring
return the value of the instance variable 'monitoring' (automatically generated)

o  monitoring: aBoolean
if true;
reset transmissions read from fileName,
after each processing-loop about the transmissions

o  onErrorBlock
get the value of the instance variable 'errorHandler' (automatically generated)

o  onErrorBlock: aOneArgBlock
set the value of the instance variable 'errorHandler' (automatically generated)

o  timerProcess
return the value of the instance variable 'timerProcess' (automatically generated)

o  transmissionInfoHolder: aValueHolder
set the value of the instance variable 'transmissionInfoHolder' (automatically generated)

o  transmissions
return the value of the instance variable 'transmissions' (automatically generated)

o  transmissions: aTransmissionList
set the value of the instance variable 'transmissions' (automatically generated)

processing
o  doTimerActions

o  startService
start a sub-process to invoke timer actions cyclic here

usage example(s):

        URITransmissionService new startService

o  terminateService
terminate the sub-process about the timer actions

usage example(s):

        URITransmissionService new terminateService

o  transmissionsCriticalDo: aBlock
do operate with RecursionLock on transmissions

queries
o  state

validation
o  evaluateFile
ignore non-existing files or files not due to be evaluated


Examples:


    |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.

ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 11 Aug 2022 11:08:42 GMT