public class Component extends ParameterElement
| Modifier and Type | Field and Description |
|---|---|
static java.util.List |
AGENT_ATTRIBUTES
The allowed message attributes.
|
static java.lang.String |
AID |
static java.lang.String |
DESCRIPTION |
static Component |
DUMMY_COMPONENT
The dummy agent
|
static java.lang.String |
DUMMY_NAME
The name for the dummy agent
|
static java.lang.String |
ID
The id of the element
|
static java.lang.String |
MESSAGE_COUNT |
static java.lang.String |
MESSAGE_VISIBLE |
protected java.util.List |
messages
The messages send or received by the agent
|
static int |
NO_MESSAGES |
static java.lang.String |
STATE |
static java.lang.String |
STATE_DEAD |
static java.lang.String |
STATE_DUMMY |
static java.lang.String |
STATE_IGNORED |
static java.lang.String |
STATE_OBSERVED |
static java.lang.String |
STATE_REMOTE |
CLASS, NAME, parameters, visible| Constructor and Description |
|---|
Component()
Constructor for a dummy agent which represents every agent not present on
the canvas.
|
Component(jadex.bridge.service.types.cms.IComponentDescription desc)
Constructor for any named agent to be put on the Agent Canvas
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMessage(Message message)
Adds a message to the agent.
|
boolean |
applyFilter(ComponentFilter[] filter,
boolean zeromessages)
Applies a filter to the agent and returns if the visibility has changed.
|
int |
compareTo(java.lang.Object o)
Agents are compared by their names.
|
static java.lang.String[] |
getDeclaredAttributes() |
jadex.bridge.service.types.cms.IComponentDescription |
getDescription() |
java.lang.String |
getId() |
java.util.List |
getMessages()
Returns the messages send or received by the agent.
|
java.lang.Object |
getParameter(java.lang.String name)
Returns the parameter with the given name.
|
java.util.Map |
getParameters()
Returns the parameter map.
|
java.lang.String |
getState() |
void |
removeAllMessages()
Removes all messages send or received by the agent.
|
void |
removeMessage(Message message)
Removes a message from the agent.
|
void |
setMessages(java.util.List messages)
Set the messages.
|
void |
setState(java.lang.String state) |
java.lang.String |
toString() |
equals, hasParameter, isVisible, setParameter, setParameters, setVisiblepublic static final Component DUMMY_COMPONENT
public static final java.lang.String DUMMY_NAME
public static final java.lang.String STATE
public static final java.lang.String ID
public static final java.lang.String AID
public static final java.lang.String DESCRIPTION
public static final java.lang.String MESSAGE_COUNT
public static final java.lang.String MESSAGE_VISIBLE
public static final int NO_MESSAGES
public static final java.lang.String STATE_DEAD
public static final java.lang.String STATE_OBSERVED
public static final java.lang.String STATE_IGNORED
public static final java.lang.String STATE_DUMMY
public static final java.lang.String STATE_REMOTE
public static final java.util.List AGENT_ATTRIBUTES
protected java.util.List messages
public Component()
public Component(jadex.bridge.service.types.cms.IComponentDescription desc)
public static final java.lang.String[] getDeclaredAttributes()
public java.util.Map getParameters()
getParameters in class ParameterElementpublic java.lang.Object getParameter(java.lang.String name)
getParameter in class ParameterElementname - The parameter name.public jadex.bridge.service.types.cms.IComponentDescription getDescription()
public java.lang.String getState()
public void setState(java.lang.String state)
state - The state to set.public boolean applyFilter(ComponentFilter[] filter, boolean zeromessages)
filter - The array of filters to apply to.zeromessages - True if the zero message filter should be appliedpublic java.util.List getMessages()
public void setMessages(java.util.List messages)
messages - The messages.public void addMessage(Message message)
message - The message to add to the agent.public void removeMessage(Message message)
message - The message to remove.public void removeAllMessages()
public java.lang.String getId()
getId in class ParameterElementpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.ComparablecompareTo in class ParameterElementpublic java.lang.String toString()
toString in class ParameterElement