public class Client extends ConnectionWithStatus implements IStatefulObject
ConnectionWithStatus.Status
Modifier and Type | Field and Description |
---|---|
protected String |
dstAddressPrefixedName |
Modifier and Type | Method and Description |
---|---|
void |
close()
Gracefully close this client.
|
Object |
getState() |
void |
notifyInterestChanged(org.jboss.netty.channel.Channel channel)
Called by Netty thread on change in channel interest
|
Iterator<TaskMessage> |
recv(int flags,
int clientId)
Receiving messages is not supported by a client.
|
void |
send(int taskId,
byte[] payload)
send a message with taskId and payload
|
void |
send(Iterator<TaskMessage> msgs)
Enqueue task messages to be sent to the remote destination (cf.
|
ConnectionWithStatus.Status |
status()
Note: Storm will check via this method whether a worker can be activated safely during the initial startup of a
topology.
|
String |
toString() |
protected final String dstAddressPrefixedName
public ConnectionWithStatus.Status status()
status
in class ConnectionWithStatus
public Iterator<TaskMessage> recv(int flags, int clientId)
recv
in interface IConnection
flags
- 0: block, 1: non-blockUnsupportedOperationException
- whenever this method is being called.public void send(int taskId, byte[] payload)
IConnection
send
in interface IConnection
taskId
- task IDpublic void send(Iterator<TaskMessage> msgs)
send
in interface IConnection
public void close()
close
in interface IConnection
public Object getState()
getState
in interface IStatefulObject
public void notifyInterestChanged(org.jboss.netty.channel.Channel channel)
channel
- Copyright © 2016 The Apache Software Foundation. All Rights Reserved.