Constructor and Description |
---|
AgentCommand()
Create a new empty command Wrapper.
|
AgentCommand(ICommand command)
Create a new command wrapper for send data or commands to other agents.
|
Modifier and Type | Method and Description |
---|---|
void |
add(ICommand command)
Add an item to end of the list.
|
IAgentController |
getSender()
Give the sender of this command wrapper.
|
ICommand |
peek()
Peek the first message from queue.
|
ICommand |
poll()
Retrieves and removes the first element of this list, or returns null if this list is empty.
|
void |
setSender(IAgentController sender)
Set the sender of this command wrapper.
|
int |
size()
Return the size of current queue-list.
|
public AgentCommand(ICommand command)
command
- Command to send to agentpublic AgentCommand()
public ICommand peek()
public ICommand poll()
public void add(ICommand command)
command
- Command add to queue.public int size()
public IAgentController getSender()
public void setSender(IAgentController sender)
sender
- sender to set