public class Client extends ConnectionWithStatus implements IStatefulObject
ConnectionWithStatus.Status| Modifier and Type | Field and Description |
|---|---|
protected String |
dstAddressPrefixedName |
protected Map |
stormConf |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Gracefully close this client.
|
Object |
getState() |
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
protected final Map stormConf
public ConnectionWithStatus.Status status()
status in class ConnectionWithStatuspublic Iterator<TaskMessage> recv(int flags, int clientId)
recv in interface IConnectionflags - 0: block, 1: non-blockUnsupportedOperationException - whenever this method is being called.public void send(int taskId,
byte[] payload)
IConnectionsend in interface IConnectiontaskId - task IDpublic void send(Iterator<TaskMessage> msgs)
send in interface IConnectionpublic void close()
close in interface IConnectionpublic Object getState()
getState in interface IStatefulObjectCopyright © 2015. All rights reserved.