Open topic with navigation

TIBCO® Enterprise Administrator 2.4.2

# Modeling Members in Interface Style

To model a managed object that contains other managed objects, implement the supplemental interface com.tibco.tea.agent.api.WithMembers.

Members indicates a containment relationship. Model any other type of relationship using @TeaReference. See also References Aspect.
Before you beginThe container object is defined in interface style.

Procedure
1. Implement the WithMembers interface in your managed object type.

       public class TomcatServer implements TeaObject, WithMembers
           ...
           public Collection<BaseTeaObject> getMembers() {
           }
       }

2. Implement the getMembers method to return the set of member objects.
   getMembers must return a generic collection of BaseTeaObject (or any compatible type).
   For example, the members of a Tomcat server are the web applications that run in the server.

       public class TomcatServer implements TeaObject, WithMembers
           ...
           public Collection<BaseTeaObject> getMembers() {
               final Collection<BaseTeaObject> members = new ArrayList<BaseTeaObject>();
               for (final WebApp wapp : this.getWebApps()) {
                   members.add(wapp);
               }
               return members;
               ...
           }
       }

   Implementing this method allows the Tomcat agent to supply the members when the TIBCO Enterprise Administrator server requests them.

Did you find this helpful?

Yes No
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO® Enterprise Administrator

Copyright © 1996-2025. Cloud Software Group, Inc. All Rights Reserved.