25 #include "THttpServer.h"
65 if (args!=0) Info(
"Create",
"args = %s", args);
69 if (strncmp(args,
"http:",5) == 0) {
70 url.
SetUrl(std::string(
"http://localhost:") + (args+5),
false);
72 if (strncmp(args,
"fastcgi:",8) == 0) {
73 url.
SetUrl(std::string(
"fastcgi://localhost:") + (args+8),
false);
75 if (strncmp(args,
"master:",7) == 0) {
76 url.
SetUrl(std::string(
"dabc://") + (args+7),
false);
78 if (strchr(args,
':')!=0) {
79 url.
SetUrl(std::string(
"dabc://") + args,
false);
81 url.
SetUrl(std::string(
"server://localhost:") + args,
false);
85 EOUT(
"Wrong arguments %s", args);
102 if (!
dabc::mgr.Execute(cmd1))
return kFALSE;
110 if (
dabc::mgr.FindItem(
"/fastcgi").
null()) {
115 if (!
dabc::mgr.Execute(cmd1))
return kFALSE;
129 DOUT0(
"Cannot create control instance");
133 DOUT1(
"Create slave command channel for master %s ", master_url.c_str());
136 cmd.
SetStr(
"Master", master_url);
137 cmd.
SetStr(
"NameSufix", topfolder);
139 DOUT0(
"FAIL to activate connection to master %s", master_url.c_str());
148 if (
dabc::mgr.FindItem(
"/ROOT").
null()) {
150 std::string player_class = url.
GetOptionStr(
"player",
"root::Monitor");
154 cmd2.
SetStr(
"prefix", topfolder);
156 if (!
dabc::mgr.Execute(cmd2))
return kFALSE;
159 if (player.
null())
return kFALSE;
173 if (!GetServer() || !GetServer()->GetSniffer())
return;
virtual Bool_t Create(const char *args)
Represents command with its arguments.
bool SetStr(const std::string &name, const char *value)
bool SetBool(const std::string &name, bool v)
bool SetInt(const std::string &name, int v)
Reference GetRef(const std::string &name)
Returns reference from the command, can be called only once.
Reference FindItem(const std::string &name)
bool CreatePublisher()
Create publisher, which manage all published hierarchies.
const char * GetName() const
Return name of referenced object, if object not assigned, returns "---".
bool null() const
Returns true if reference contains nullptr.
Uniform Resource Locator interpreter.
std::string GetOptionStr(const std::string &optname, const std::string &dflt="") const
bool SetUrl(const std::string &url, bool showerr=true)
bool HasOption(const std::string &optname) const
std::string GetProtocol() const
std::string GetHostNameWithPort(int dfltport=0) const
std::string GetOptions() const
Reference on dabc::Worker
bool MakeThreadForWorker(const std::string &thrdname="")
void ProcessActionsInRootContext(THttpServer *serv, TRootSniffer *sniff)
bool CreateManager(const std::string &name, int cmd_port=-1)
Function should be used to create manager instance.
void SetDebugLevel(int level=0)