public class QApiConnection extends Object implements Closeable
| Constructor and Description |
|---|
QApiConnection(InetAddress address,
int port) |
QApiConnection(InetSocketAddress address) |
QApiConnection(Socket socket) |
QApiConnection(String address,
int port) |
| Modifier and Type | Method and Description |
|---|---|
<Result,Response extends QApiResponse<Result>> |
call(QApiCommand<?,Response> command) |
void |
close() |
QApiGreeting |
getGreeting() |
VersionInfo |
getQEmuVersion() |
<Response extends QApiResponse<?>> |
invoke(QApiCommand<?,Response> command) |
public QApiConnection(@Nonnull Socket socket) throws IOException
IOExceptionpublic QApiConnection(@Nonnull InetAddress address, @Nonnegative int port) throws IOException
IOExceptionpublic QApiConnection(@Nonnull String address, @Nonnegative int port) throws IOException
IOExceptionpublic QApiConnection(@Nonnull InetSocketAddress address) throws IOException
IOException@Nonnull public QApiGreeting getGreeting()
@Nonnull public VersionInfo getQEmuVersion()
@Nonnull public <Response extends QApiResponse<?>> Response invoke(@Nonnull QApiCommand<?,Response> command) throws IOException
IOException@Nonnull public <Result,Response extends QApiResponse<Result>> Result call(@Nonnull QApiCommand<?,Response> command) throws IOException, QApiException
IOExceptionQApiExceptionpublic void close() throws IOException
close in interface Closeableclose in interface AutoCloseableIOException