Modeling State in Interface Style
To model a managed object that has states, implement the supplemental interface com.tibco.tea.agent.api.WithStatus. WithStatus requires that you implement one method, getStatus, which returns the current state of a managed object.
See also States Aspect.
Procedure
-
Implement the
WithStatus interface in your managed object type.
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:
public class TomcatServer implements TeaObject, WithStatus ... public AgentObjectStatus getStatus() { ... } }
Copyright © Cloud Software Group, Inc. All rights reserved.