MoleQueue  0.8.0
 All Classes Functions Variables Enumerations Enumerator Pages
Signals | Public Member Functions | List of all members
Connection Class Referenceabstract

#include <molequeue/servercore/connection.h>

Inheritance diagram for Connection:
LocalSocketConnection ZeroMqConnection

Signals

void packetReceived (const MoleQueue::PacketType &packet, const MoleQueue::EndpointIdType &endpoint)
 
void disconnected ()
 

Public Member Functions

 Connection (QObject *parentObject=0)
 
virtual void open ()=0
 
virtual void start ()=0
 
virtual void close ()=0
 
virtual bool isOpen ()=0
 
virtual QString connectionString () const =0
 
virtual bool send (const PacketType &packet, const EndpointIdType &endpoint)=0
 
virtual void flush ()=0
 

Detailed Description

The Connection class is an interface defining the connection using to communicate between MoleQueue processes. Subclasses provide concrete implements for example based on local socket.

See Also
LocalSocketConnection

Constructor & Destructor Documentation

Connection ( QObject *  parentObject = 0)
explicit

Constructor.

Parameters
parentObjectparent

Member Function Documentation

virtual void open ( )
pure virtual

Open the connection

Implemented in LocalSocketConnection, and ZeroMqConnection.

virtual void start ( )
pure virtual

Start receiving messages on this connection

Implemented in LocalSocketConnection, and ZeroMqConnection.

virtual void close ( )
pure virtual

Close the connection. Once a conneciton is closed if can't reused.

Implemented in LocalSocketConnection, and ZeroMqConnection.

virtual QString connectionString ( ) const
pure virtual
Returns
the connect string description the endpoint the connection is connected to.

Implemented in LocalSocketConnection, and ZeroMqConnection.

virtual bool send ( const PacketType &  packet,
const EndpointIdType &  endpoint 
)
pure virtual

Send the packet on the connection to endpoint.

Implemented in LocalSocketConnection, and ZeroMqConnection.

virtual void flush ( )
pure virtual

Flush all pending messages to the other endpoint.

Implemented in LocalSocketConnection, and ZeroMqConnection.

void packetReceived ( const MoleQueue::PacketType &  packet,
const MoleQueue::EndpointIdType &  endpoint 
)
signal

Emitted when a new message has been received on this connection.

Parameters
msgThe message received.
void disconnected ( )
signal

Emited when the connection is disconnected.


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