5#ifndef JIVEXML_JIVEXMLSERVER_H
6#define JIVEXML_JIVEXMLSERVER_H
22#include <GaudiKernel/IMessageSvc.h>
23#include <GaudiKernel/StatusCode.h>
31#include <owl/semaphore.h>
36 class ThreadCollection;
62 virtual int GetState()
const override;
68 virtual void Message(
const MSG::Level level,
const std::string&
msg )
const override;
70 virtual MSG::Level
LogLevel()
const override;
Define macros for attributes used to control the static checker.
For the client-server communication, each event is uniquely identified by the run number,...
Pure abstract interface for all full server implementations.
virtual bool GetRunServerFlag() const override
The server thread will stop once this flag is set to false.
virtual StatusCode UpdateEventForStream(const EventStreamID &evtStreamID, const std::string &event) override
Put this event as new current event for stream given by name.
virtual ~JiveXMLServer()
Destructor.
virtual std::vector< std::string > GetStreamNames() const override
get the names of all the streams
virtual void Message(const MSG::Level level, const std::string &msg) const override
This function is exposed to allow using ERS messaging service from other threads.
virtual MSG::Level LogLevel() const override
Get the logging level.
virtual void ServerThreadStopped() override
Callback whenever the server thread is stopped.
static std::atomic< int > m_receivedSignal
static void signalHandler(int signum)
When the signal handler is called, switch the lock to the post condition.
static OWLSemaphore m_lock ATLAS_THREAD_SAFE
StatusCode StartServingThread()
Start the serving thread.
void Wait()
Wait for the server finish.
EventStreamMap m_eventStreamMap
StatusCode StopServingThread()
Stop the serving thread.
pthread_t m_ServerThreadHandle
JiveXMLServer(int port=0)
Constructor.
virtual int GetState() const override
get the Status of the application
virtual const std::string GetEvent(const EventStreamID &evtStreamID) const override
get the current event for a particular stream
virtual const EventStreamID GetEventStreamID(const std::string &streamName) const override
get the current EventStreamID for a particular stream
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
std::map< const EventStreamID, const std::string > EventStreamMap