public class Connection extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
HEARTBEAT_MAX_INTERVAL |
static byte[] |
MAGIC_PROTOCOL_VERSION |
static io.netty.util.AttributeKey<Connection> |
STATE |
| Constructor and Description |
|---|
Connection(ServerAddress serverAddress,
NSQConfig config) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
io.netty.channel.ChannelFuture |
command(NSQCommand command) |
NSQFrame |
commandAndWait(NSQCommand command) |
NSQConfig |
getConfig() |
ServerAddress |
getServerAddress() |
void |
incoming(NSQFrame frame) |
boolean |
isConnected() |
boolean |
isHeartbeatStatusOK() |
boolean |
isRequestInProgress() |
void |
setConsumer(NSQConsumer consumer) |
void |
setErrorCallback(NSQErrorCallback callback) |
public static final byte[] MAGIC_PROTOCOL_VERSION
public static final io.netty.util.AttributeKey<Connection> STATE
public static final long HEARTBEAT_MAX_INTERVAL
public Connection(ServerAddress serverAddress, NSQConfig config) throws NoConnectionsException
NoConnectionsExceptionpublic boolean isConnected()
public boolean isRequestInProgress()
public boolean isHeartbeatStatusOK()
public void incoming(NSQFrame frame)
public void setErrorCallback(NSQErrorCallback callback)
public void close()
public NSQFrame commandAndWait(NSQCommand command) throws TimeoutException
TimeoutExceptionpublic io.netty.channel.ChannelFuture command(NSQCommand command)
public ServerAddress getServerAddress()
public NSQConfig getConfig()
public void setConsumer(NSQConsumer consumer)
Copyright © 2017. All rights reserved.