Functor
XService ("src/sys/XService.oz")
Import
- Connection
- Fault
- Open
- OS(uName system tmpnam unlink getEnv)
- Pickle
- Property
- System
- File at "x-ozlib://mathweb/share/File.ozf"
- Internet at "x-ozlib://mathweb/share/Internet.ozf"
Export
Define
class MetaService
feat ServiceName ServiceClass BrokerURL BrokerTicket AppMan
- init(appMan:App autoexit:Autoexit class:Class name:Name ticket:Ticket url:URL)
- create(PortSend brokerTicket:Ticket brokerURL:URL)
- ping($)
- shutdown()
end
class ThreadManager
- init()
- newThread(Proc0 info:Info)
- infoThread(Info)
- tryTerminateAll()
end
class ClientManager from ThreadManager
feat clientName clientUser clientHost clientDisplay clientPort
- init(ClientInfo)
- showEnter(ShowInfo)
- startThreads()
- showLeave(ShowInfo)
end
class FaultManager from ClientManager
feat clientWatcher
- installWatcher(Watch conditions:Conditions)
- deinstallWatcher()
end
class Server from ThreadManager ClientManager FaultManager
feat brokerURL brokerTicket host ident args
- get(host:FeatHost name:FeatName)
- init(ticket:BrokerTicket url:BrokerURL)
- enter(args:ServerArgs client:ClientInfo)
- terminate()
end
class ShellProver from Server <Unknown:TmpDir> TmpFiles Mailer
feat times client
- doInit()
- exec(Cmd nice:Nice timer:Timer)
- start(Cmd maxCPU:CPUMax nice:Nice times:Times)
- saveVS(VS FileName)
- prove(ProblemBS Result syntax:Syntax times:Times)
- getTimes(Times)
- kill()
- leave()
end
class TmpFiles from <Unknown:TmpDir>
- registerTmpFile(FileName)
- rmTmpFiles()
end
class Mailer
- mail(FileVS to:AddressVS)
end
class SimpleService from Server Mailer
feat times
- doInit()
- send(...)
- analyzeResult($)
- return(Result killDefault:KillDefault times:Times)
- getTimes(Times)
- Kill()
- kill()
- leave()
- idle($)
end
class CASService from Server
feat entity
- doInit()
- startCAS(...)
- preProcess(ExprVS $)
- postProcess(Result $)
- eval(Expr Result)
- readRest($)
- kill()
- leave()
end
class ServiceManager
feat appName appManager serviceName serviceClass args host broker brokerURL brokerTicket
- getArgs(Args)
- getBroker(port:Broker ticket:BrokerTicket url:BrokerURL)
- init(ServiceName ServiceClass appMan:App appName:AppName)
- offerService()
end
End