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.24 date: 2023/12/08 13:10:35
user: cg
file: URITransmissionService.st directory: goodies/communication
module: stx stc-classLibrary: communication

Description:


documentation to be added.


[instance variables:]

[class variables:]

copyright

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

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

Usage example(s):

    |list|

    Error handle:[:ex| self halt.
        Transcript showCR:ex description.
        ex proceed.
    ] do:[
        list := self transmissionListFromFile:'~/pcsmd/config/fileTransfer'
    ].
    list


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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:13:02 GMT