| Modifiers | Name | Description |
|---|---|---|
protected long |
timeout |
Timeout used in request messages. |
| Fields inherited from class | Fields |
|---|---|
class Agent |
NON_BLOCKING, BLOCKING |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected void |
addCapability(Capability cap)Adds capability the agent is capable of. |
|
protected List<Parameter> |
allOf(Class... paramEnumClasses)Generate a list of parameters from a parameter enumeration. |
|
boolean |
deregister(String service) |
|
boolean |
deregister(Enum<?> service) |
|
protected void |
die(Throwable ex) |
|
protected Object |
get(AgentID aid, Parameter param)Requests value of parameter from another agent. |
|
protected Object |
get(AgentID aid, int index, Parameter param)Requests value of indexed parameter from another agent. |
|
protected String |
getBuildInfo()Gets the build string for a given class. |
|
Level |
getLogLevel()Gets the current log level for the agent. |
|
protected Object |
getParam(Parameter p, int ndx)Agents providing dynamic parameters may override this method to provide a value for a given parameter. |
|
List<Class<Parameter>> |
getParameterClasses()Gets a list of parameter classes supported by this agent. |
|
List<Class<Parameter>> |
getParameterClasses(int index)Gets a list of indexed parameter classes supported by this agent. |
|
protected List<Parameter> |
getParameterList()An agent supporting parameters should return a list of parameters by overriding this method. |
|
protected List<Parameter> |
getParameterList(int index)An agent supporting indexed parameters should return a list of indexed parameters by overriding this method. |
|
String[] |
getServices()Gets a list of services provided by the agent. |
|
String |
getTitle()Gets a descriptive name for the agent. |
|
protected void |
init()Initialize the unet agent and its behaviors. |
|
protected Long |
longValue(Object v)Returns the value of any given object as a Long. null objects have a null value. |
|
protected void |
processMessage(Message msg)An agent wishing to process all messages other than requests and queries may override this method to handle incoming messages. |
|
protected Message |
processParameterReq(ParameterReq msg)Default handling of parameter requests is provided by this method. |
|
protected Message |
processQuery(Message msg)An agent supporting queries should override this method to handle incoming queries. |
|
protected Message |
processRequest(Message msg)An agent supporting requests should override this method to handle incoming requests. |
|
boolean |
register(String service) |
|
boolean |
register(Enum<?> service) |
|
protected Object |
set(AgentID aid, Parameter param, Object value)Requests value of parameter to be changed in another agent. |
|
protected Object |
set(AgentID aid, int index, Parameter param, Object value)Requests value of indexed parameter to be changed in another agent. |
|
void |
setLogLevel(Level lvl)Sets the current log level for the agent. |
|
protected Object |
setParam(Parameter p, int ndx, Object v)Agents providing dynamic parameters may override this method to set a value for a given parameter. |
|
protected void |
setup()Called by UnetAgent when the agent is being initialized. |
|
protected void |
shutdown() |
|
protected void |
startup()Called by UnetAgent after all agents are fully initialized. |
|
protected void |
subscribeForService(String service)Subscribe to all agents providing a specified service. |
|
protected void |
subscribeForService(Enum<?> service)Subscribe to all agents providing a specified service. |
|
protected void |
unsubscribeForService(String service)Unsubscribe from all agents providing a specified service. |
|
protected void |
unsubscribeForService(Enum<?> service)Unsubscribe from all agents providing a specified service. |
| Methods inherited from class | Name |
|---|---|
class Agent |
println, run, add, toString, register, register, clone, currentTimeMillis, nanoTime, getName, stop, getState, setLogLevel, topic, topic, topic, topic, topic, topic, send, receive, receive, receive, receive, receive, receive, receive, receive, getPlatform, request, request, subscribe, getStore, getContainer, deregister, deregister, wake, agent, agentForService, agentForService, agentsForService, agentsForService, getAgentID, unsubscribe, platformSend, setQueueSize, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll |
class Object |
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Adds capability the agent is capable of.
cap - capabilityGenerate a list of parameters from a parameter enumeration. This method is designed for agents to use in the getParameterList() method.
paramEnumClasses - enums representing the parameters.Requests value of parameter from another agent.
aid - agent to request parameter fromparam - parameter to requestRequests value of indexed parameter from another agent.
aid - agent to request parameter fromindex - index of parameter setparam - parameter to requestGets the build string for a given class. The build information is extracted from the jar is available.
Gets the current log level for the agent.
Agents providing dynamic parameters may override this method to provide a value for a given parameter.
p - parameter to get value.ndx - index for indexed parameters, -1 if non-indexed.Gets a list of parameter classes supported by this agent.
Gets a list of indexed parameter classes supported by this agent.
index - index to list parameter classes.An agent supporting parameters should return a list of parameters by overriding this method.
An agent supporting indexed parameters should return a list of indexed parameters by overriding this method.
index - index to list parameters.Gets a list of services provided by the agent.
Gets a descriptive name for the agent.
Initialize the unet agent and its behaviors.
Returns the value of any given object as a Long. null objects have a null value. Numeric values are converted to the closest Long value. String values are parsed into Long. Booleans have a value of 1 if true, and 0 if false. Any other type of input value results in a null.
v - object to convert to Long.An agent wishing to process all messages other than requests and queries may override this method to handle incoming messages.
msg - incoming message.Default handling of parameter requests is provided by this method. Agents wishing to have special handling may override this method.
msg - incoming parameter request.An agent supporting queries should override this method to handle incoming queries.
msg - incoming query.An agent supporting requests should override this method to handle incoming requests.
msg - incoming request.Requests value of parameter to be changed in another agent.
aid - agent to request parameter changeparam - parameter to request to be changedvalue - new value of parameterRequests value of indexed parameter to be changed in another agent.
aid - agent to request parameter changeindex - index of parameter setparam - parameter to request to be changedvalue - new value of parameterSets the current log level for the agent.
lvl - log levelAgents providing dynamic parameters may override this method to set a value for a given parameter.
p - parameter to set value.ndx - index for indexed parameters, -1 if non-indexed.v - value of the parameter.Called by UnetAgent when the agent is being initialized.
Called by UnetAgent after all agents are fully initialized.
Subscribe to all agents providing a specified service.
Subscribe to all agents providing a specified service.
Unsubscribe from all agents providing a specified service.
Unsubscribe from all agents providing a specified service.