|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.drdanick.McRKit.api.RTKInterface
public class RTKInterface
The RTKInterface handles all of the UDP API calls to the RemoteToolkit Minecraft wrapper.
| Nested Class Summary | |
|---|---|
static class |
RTKInterface.CommandType
Defines the type of action to perform. |
| Constructor Summary | |
|---|---|
RTKInterface(int port,
java.lang.String host,
java.lang.String user,
java.lang.String password,
java.lang.String salt)
Instantiates an RTKInterface. |
|
| Method Summary | |
|---|---|
void |
executeCommand(RTKInterface.CommandType type,
java.lang.String commandParameter)
Executes an API function. |
java.lang.String |
getLastResponse()
Get the last response that was received from the server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RTKInterface(int port,
java.lang.String host,
java.lang.String user,
java.lang.String password,
java.lang.String salt)
port - The port to send API events to.host - The host name to send API events to.user - The wrapper username to send API calls as.password - The wrapper password that is tied to username.salt - the String to salt the password with.| Method Detail |
|---|
public java.lang.String getLastResponse()
throws java.lang.InterruptedException
If no response has been received from the server since the current request was made, this method will block until either a response is recorded, or the request times out.
java.lang.InterruptedException - if the underlying wait() call is interrupted.
public void executeCommand(RTKInterface.CommandType type,
java.lang.String commandParameter)
throws java.io.IOException,
RTKInterfaceException
type - The type of wrapper function to perform.commandParameter - used to specify extra parameters used by some CommandTypes.
java.io.IOException - If an IOException occurs when making the request.
RTKInterfaceException - if the command is invalid.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||