mycq::MyCQClient Class Reference
Provides methods for connecting and closing to a MyCQ Server.
More...
#include <MyCQClient.h>
List of all members.
Detailed Description
Provides methods for connecting and closing to a MyCQ Server.
#include <iostream>
#include "../MyCQClientCPP/MyCQClient.h"
using namespace mycq;
void examMyCQClient()
{
MyCQClient* client = MyCQFactory::getMyCQClient();
try
{
client->connect("localhost", 3030, "root", "1234");
}
catch(MyCQException& ex)
{
std::cout << "code:" << ex.getCode() << ", message:" << ex.getMessage();
}
client->close();
MyCQFactory::close(client);
}
Member Function Documentation
virtual void mycq::MyCQClient::close |
( |
|
) |
[pure virtual] |
Close the connection to a MyCQ server.
virtual void mycq::MyCQClient::connect |
( |
string |
destination, |
|
|
int |
port, |
|
|
string |
username, |
|
|
string |
password | |
|
) |
| | [pure virtual] |
Connect to a MyCQ Server. This method block while the connection is being established.
- Parameters:
-
| destination | A destination address of a MyCQ server to connect. |
| port | An integer greater than zero that contains the port to be used on destination. |
| username | A user name of a MyCQ server to login. |
| password | A password of a user name to login. |
- Exceptions:
-
virtual CQManager* mycq::MyCQClient::getCQManager |
( |
|
) |
[pure virtual] |
virtual QueueManager* mycq::MyCQClient::getQueueManager |
( |
|
) |
[pure virtual] |
virtual UserManager* mycq::MyCQClient::getUserManager |
( |
|
) |
[pure virtual] |
virtual bool mycq::MyCQClient::isConnected |
( |
|
) |
[pure virtual] |
Check if MyCQ client is connected to MyCQ server.
- Returns:
- Boolean value. true(connected), false(closed).
The documentation for this class was generated from the following file: