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
IOException
public QApiConnection(@Nonnull InetAddress address, @Nonnegative int port) throws IOException
IOException
public QApiConnection(@Nonnull String address, @Nonnegative int port) throws IOException
IOException
public 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
IOException
QApiException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException