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.
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() {
MyCQClient client = MyCQFactory.getMyCQClient();
try {
client.connect("localhost", 3030, "root", "1234");
} catch (MyCQException ex) {
System.out.println("code:" + ex.getCode() + ", message:"
+ ex.getMessage());
}
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:
-
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).