Modeling State in Annotation Style
To model a managed object that has states, implement a method the returns the current state, and annotate that method as @TeaGetStatus.
See also States Aspect.
Procedure
-
Implement a method to get the state. Annotate it as
@TeaGetStatus.
The status method must return an instance of the class com.tibco.tea.agent.types.AgentObjectStatus. AgentObjectStatus is a standard format for encapsulating state within agents. It has three fields:
@TeaGetStatus AgentObjectStatus getStatus(@KeyParam final String key) { AgentObjectStatus result = new AgentObjectStatus(); ... return result; }
Copyright © Cloud Software Group, Inc. All rights reserved.