Commit 743e032b authored by Dainius Simelevicius's avatar Dainius Simelevicius
Browse files

references #137: added action listener for spotlight2g, spotlighocci and xmas-store2g

parent d41b80e5
......@@ -64,53 +64,51 @@
XDAQ_INSTANTIATOR_IMPL(sentinel::spotlight2g::Application);
sentinel::spotlight2g::Application::Application(xdaq::ApplicationStub* s)
sentinel::spotlight2g::Application::Application(xdaq::ApplicationStub* s)
: xdaq::Application(s), xgi::framework::UIManager(this),
dispatcher_("urn:xdaq-workloop:spotlight","waiting", 0.8),
dispatcher_("urn:xdaq-workloop:spotlight","waiting", 0.8),
repository_(0)
{
{
s->getDescriptor()->setAttribute("icon", "/sentinel/spotlight2g/images/spotlight2g-icon.png");
s->getDescriptor()->setAttribute("icon16x16", "/sentinel/spotlight2g/images/spotlight2g-icon.png");
s->getDescriptor()->setAttribute("service", "sentinelspotlight2g");
//Direct eventing addresses
this->getApplicationInfoSpace()->fireItemAvailable("eventings", &eventings_);
subscribeGroup_ = "";
this->getApplicationInfoSpace()->fireItemAvailable("subscribeGroup", &subscribeGroup_);
exceptionsTimeWindow_ = "PT60M"; // Keep one hour per file
maintenanceInterval_ = "PT30M"; // Archive every 30 minutes
archiveWindow_ = "PT60M"; // new archive file name date-hour
jelFileName_ = "";
this->getApplicationInfoSpace()->fireItemAvailable("exceptionsTimeWindow", &exceptionsTimeWindow_);
this->getApplicationInfoSpace()->fireItemAvailable("maintenanceInterval", &maintenanceInterval_);
this->getApplicationInfoSpace()->fireItemAvailable("archiveWindow", &archiveWindow_);
this->getApplicationInfoSpace()->fireItemAvailable("jelFileName", &jelFileName_);
// Activates work loop for dashboard asynchronous operations (SOAP messages)
dispatcher_.addActionListener(this);
(void) toolbox::task::getWorkLoopFactory()->getWorkLoop("urn:xdaq-workloop:spotlight", "waiting")->activate();
// Activates work loop for dashboard asynchronous operations (SOAP messages)
dispatcher_.addActionListener(this);
(void) toolbox::task::getWorkLoopFactory()->getWorkLoop("urn:xdaq-workloop:spotlight", "waiting")->activate();
repositoryPath_ = "/tmp";
this->getApplicationInfoSpace()->fireItemAvailable("repositoryPath",&repositoryPath_);
// Which flashlist tags to retrieve from the ws-eventing
topic_ = "sentinel";
this->getApplicationInfoSpace()->fireItemAvailable("topic", &topic_);
// Which flashlist tags to retrieve from the ws-eventing
topic_ = "sentinel";
this->getApplicationInfoSpace()->fireItemAvailable("topic", &topic_);
scanPeriod_ = "PT10S";
this->getApplicationInfoSpace()->fireItemAvailable("scanPeriod",&scanPeriod_);
subscribeExpiration_ = "PT30S";
this->getApplicationInfoSpace()->fireItemAvailable("subscribeExpiration",&subscribeExpiration_);
scanPeriod_ = "PT10S";
this->getApplicationInfoSpace()->fireItemAvailable("scanPeriod",&scanPeriod_);
subscribeExpiration_ = "PT30S";
this->getApplicationInfoSpace()->fireItemAvailable("subscribeExpiration",&subscribeExpiration_);
// bind SOAP interface for incoming 'notify' messages containing exceptions
//
b2in::nub::bind(this, &sentinel::spotlight2g::Application::onMessage );
// bind SOAP interface for incoming 'notify' messages containing exceptions
//
b2in::nub::bind(this, &sentinel::spotlight2g::Application::onMessage );
// bind HTTP callbacks
xgi::framework::deferredbind(this, this, &sentinel::spotlight2g::Application::Default, "Default");
xgi::bind(this, &sentinel::spotlight2g::Application::rearm, "rearm");
......@@ -120,13 +118,13 @@ sentinel::spotlight2g::Application::Application(xdaq::ApplicationStub* s)
// 'format' indicates the result format. The default is 'html', also 'xml' is supported.
//
xgi::bind(this, &sentinel::spotlight2g::Application::view, "view");
// Clear all exceptions, cleanup and close files
xgi::bind(this, &sentinel::spotlight2g::Application::reset, "reset");
// DB operation
xgi::bind(this, &sentinel::spotlight2g::Application::files, "files");
// Generate a test exception
xgi::bind(this, &sentinel::spotlight2g::Application::generate, "generate");
xgi::bind(this, &sentinel::spotlight2g::Application::inject, "inject");
......@@ -147,7 +145,8 @@ sentinel::spotlight2g::Application::Application(xdaq::ApplicationStub* s)
// Bind setting of default parameters
getApplicationInfoSpace()->addListener(this, "urn:xdaq-event:setDefaultValues");
getApplicationContext()->addActionListener(this); // attach to endpoint available events
exceptionsLostCounter_ = 0;
}
......
......@@ -154,6 +154,7 @@ sentinel::spotlightocci::Application::Application(xdaq::ApplicationStub* s)
// Bind setting of default parameters
getApplicationInfoSpace()->addListener(this, "urn:xdaq-event:setDefaultValues");
getApplicationContext()->addActionListener(this); // attach to endpoint available events
exceptionsLostCounter_ = 0;
}
......
......@@ -98,6 +98,7 @@ xmas::store2g::Application::Application (xdaq::ApplicationStub* s)
// Bind setting of default parameters
getApplicationInfoSpace()->addListener(this, "urn:xdaq-event:setDefaultValues");
getApplicationContext()->addActionListener(this); // attach to endpoint available events
//settings_.setProperty("autorefresh", "0");
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment