My Project
Loading...
Searching...
No Matches
Public Member Functions | List of all members
System Class Reference
Collaboration diagram for System:
Collaboration graph

Public Member Functions

 System (int port)
 
void start ()
 Starts the system.
 
bool acceptConnection ()
 Try to accept a client connection.
 
void stop ()
 Stops the system.
 
void registerHandler (std::unique_ptr< IMessageHandler > handler)
 Registers a message handler.
 
bool sendMessage (const std::string &payload, MessageType type)
 Sends a message to the client.
 
bool sendMessage (const std::string &messageId, const std::string &payload, MessageType type)
 Sends a message to the client with correlation ID.
 
bool isRunning () const
 Checks if system is running.
 
bool isClientConnected () const
 Checks if client is connected.
 
void printStats () const
 Gets system statistics.
 
void handleCompleteMessage (const std::string &messageId, const std::string &payload, MessageType type)
 Handles a complete message from MessageProcessor.
 
AlgorithmScannergetAlgorithmScanner ()
 Gets the algorithm scanner.
 
AlgorithmRunnergetAlgorithmRunner ()
 Gets the algorithm runner.
 

Member Function Documentation

◆ acceptConnection()

bool System::acceptConnection ( )

Try to accept a client connection.

Returns
true if connection accepted

◆ getAlgorithmRunner()

AlgorithmRunner & System::getAlgorithmRunner ( )

Gets the algorithm runner.

Returns
Reference to algorithm runner

◆ getAlgorithmScanner()

AlgorithmScanner & System::getAlgorithmScanner ( )

Gets the algorithm scanner.

Returns
Reference to algorithm scanner

◆ handleCompleteMessage()

void System::handleCompleteMessage ( const std::string &  messageId,
const std::string &  payload,
MessageType  type 
)

Handles a complete message from MessageProcessor.

Parameters
messageIdMessage ID
payloadMessage payload
typeMessage type

◆ isClientConnected()

bool System::isClientConnected ( ) const

Checks if client is connected.

Returns
true if client is connected

◆ isRunning()

bool System::isRunning ( ) const

Checks if system is running.

Returns
true if running

◆ registerHandler()

void System::registerHandler ( std::unique_ptr< IMessageHandler handler)

Registers a message handler.

Parameters
handlerUnique pointer to handler

◆ sendMessage() [1/2]

bool System::sendMessage ( const std::string &  messageId,
const std::string &  payload,
MessageType  type 
)

Sends a message to the client with correlation ID.

Parameters
messageIdMessage ID for correlation (e.g., response to original message)
payloadMessage payload
typeMessage type
Returns
true if message was queued for sending

◆ sendMessage() [2/2]

bool System::sendMessage ( const std::string &  payload,
MessageType  type 
)

Sends a message to the client.

Parameters
payloadMessage payload
typeMessage type
Returns
true if message was queued for sending

The documentation for this class was generated from the following files: