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.IOException
public boolean logon(java.lang.String username, java.lang.String password) throws java.io.IOException
java.io.IOException
public java.lang.String sendCommand(java.lang.String data) throws java.io.IOException
java.io.IOException
public void logoff() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
Copyright © 2003-2014 QuickServer.org