public class QSAdminAPI
extends java.lang.Object
Eg:
QSAdminAPI qsAdminApi = new QSAdminAPI("127.0.0.1", 9080);
if(qsAdminApi.logon()) {
System.out.println("Logged in");
String info = qsAdminApi.sendCommand("info server");
System.out.println("Info on Server :\n"+info);
qsAdminApi.logoff();
} else {
System.out.println("Bad Login");
qsAdminApi.close();
}
QSAdminServer| Constructor and Description |
|---|
QSAdminAPI(java.lang.String host,
int port)
Creates QSAdminAPI object that will communicate with the
passed host and port.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the socket associated.
|
void |
logoff()
Logoff the QSAdminServer and closed the socket associated.
|
boolean |
logon()
Will attempt to connect and logon to the remote QsAdminServer.
|
boolean |
logon(java.lang.String username,
java.lang.String password)
Will attempt to connect and logon to the remote QsAdminServer.
|
static void |
main(java.lang.String[] args) |
java.lang.String |
sendCommand(java.lang.String data)
Sends the given command to QSAdmin and gives the response back.
|
public QSAdminAPI(java.lang.String host,
int port)
public boolean logon()
throws java.io.IOException
java.io.IOExceptionpublic boolean logon(java.lang.String username,
java.lang.String password)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String sendCommand(java.lang.String data)
throws java.io.IOException
java.io.IOExceptionpublic void logoff()
throws java.io.IOException
java.io.IOExceptionpublic void close()
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.ExceptionCopyright © 2003-2014 QuickServer.org