public class CommandSender extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.http.client.HttpClient |
client |
protected int |
port |
| Constructor and Description |
|---|
CommandSender(ClientOptions options) |
CommandSender(int port) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
commandPath(Command command) |
static String |
content(org.apache.http.HttpResponse response) |
protected org.apache.http.client.HttpClient |
createClient() |
protected org.apache.http.client.methods.HttpGet |
createGet(Command command,
String query) |
protected org.apache.http.HttpResponse |
executeGet(org.apache.http.client.methods.HttpGet get) |
String |
host() |
<T> T |
send(ClientOptions options) |
<T> T |
send(Command command) |
String |
sendRaw(ClientOptions options) |
String |
sendRaw(Command command) |
protected final org.apache.http.client.HttpClient client
protected final int port
public CommandSender(int port)
public CommandSender(ClientOptions options)
protected org.apache.http.client.HttpClient createClient()
public <T> T send(Command command) throws IOException
IOExceptionpublic <T> T send(ClientOptions options) throws IOException
IOExceptionpublic String sendRaw(Command command) throws IOException
IOExceptionpublic String sendRaw(ClientOptions options) throws IOException
IOExceptionprotected org.apache.http.HttpResponse executeGet(org.apache.http.client.methods.HttpGet get)
throws IOException
IOExceptionpublic String host()
public static String content(org.apache.http.HttpResponse response) throws IOException
IOExceptionCopyright © 2014–2015. All rights reserved.