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) throws MyCQException
 Connect to a MyCQ Server. This method block while the connection is being established.
void close ()
 Close the connection to a MyCQ server.
boolean 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.

import mycq.*;

public 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) {
                                    System.out.println("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 
) throws MyCQException

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.
boolean mycq.MyCQClient.isConnected (  ) 

Check if MyCQ client is connected to MyCQ server.

Returns:
Boolean value. true(connected), false(closed).
 All Classes Namespaces Functions Variables Enumerations
MyCQ Java User's Document. Copyright@MyCQ Inc., All Rights Reserved.