MyCQ.MyCQClient Interface Reference

Provides methods for connecting and closing to a MyCQ Server and gets the UserManager, QueueManager, CQManager. More...

List of all members.

Public Member Functions

void connect (string destination, int port, string username, string password)
 Connect to a MyCQ Server. This method block while the connection is being established.
void close ()
 Close the connection to a MyCQ server.
bool isConnected ()
 Check if MyCQ client is connected to MyCQ server.
UserManager getUserManager ()
 Get a reference of a UserManager instance.
QueueManager getQueueManager ()
 Get a reference of QueueManager instance.
CQManager getCQManager ()
 Get a reference of CQManager instance.

Detailed Description

Provides methods for connecting and closing to a MyCQ Server and gets the UserManager, QueueManager, CQManager.

using System;
using MyCQ;

namespace MyCQClientNETExample
{
    class ExamMyCQClient
    {
        public void sample()
        {
            //get a client instance
            MyCQClient client = MyCQFactory.getMyCQClient();

            try
            {
                //connect to server
                client.connect("localhost", 3030, "root", "1234");
            }
            catch (MyCQException ex)
            {
                Console.WriteLine("code:" + ex.getCode() + ", message:" + ex.getMessage());
            }

            //close
            client.close();
        }
    }
}

Member Function Documentation

void MyCQ.MyCQClient.close (  ) 

Close the connection to a MyCQ server.

void MyCQ.MyCQClient.connect ( string  destination,
int  port,
string  username,
string  password 
)

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:
MyCQException An error occurred while connect to a MyCQ server.
CQManager MyCQ.MyCQClient.getCQManager (  ) 

Get a reference of CQManager instance.

Returns:
A reference of a CQManager instance.
QueueManager MyCQ.MyCQClient.getQueueManager (  ) 

Get a reference of QueueManager instance.

Returns:
A reference of a QueueManager instance.
UserManager MyCQ.MyCQClient.getUserManager (  ) 

Get a reference of a UserManager instance.

Returns:
A reference of a CUserManager reference.
bool MyCQ.MyCQClient.isConnected (  ) 

Check if MyCQ client is connected to MyCQ server.

Returns:
Boolean value. true(connected), false(closed).

The documentation for this interface was generated from the following file:
 All Classes Functions Variables Properties
MyCQ .NET User's Document. Copyright@MyCQ Inc., All Rights Reserved.