# Java GTM Pool Member CommonIPPortDefinition

**URL:** <https://community.f5.com/t/java-gtm-pool-member-commonipportdefinition/4006>\
**Category:** Technical Forums\
**Tags:** icontrol, dev, devops\
**Created:** [February 14, 2011, 1:41pm UTC](https://community.f5.com/t/java-gtm-pool-member-commonipportdefinition/4006 "2011-02-14T13:41:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![adurstewitz\_188](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@adurstewitz\_188](https://community.f5.com/u/adurstewitz_188)\
**Post date:** [February 14, 2011, 1:41pm UTC](https://community.f5.com/t/java-gtm-pool-member-commonipportdefinition/4006/1 "2011-02-14T13:41:41Z")

</div>

I’m trying to up-fit the sample PoolMemberControl code to get the properties of a GTM pool member.

LTM Code:

iControl.CommonIPPortDefinition [][] memberDefAofA =

m\_interfaces.getLocalLBPool().get\_member(pool\_list);

Attempted GTM Code:

iControl.CommonIPPortDefinition [][] memberDefAofA = m\_interfaces.getGlobalLBPool().get\_member(pool\_list);

However, do this gives me a type incompatibility. Does anyone know the right way/method to populate the CommonIPPortDefinition array with a GTM Pool Member?

Thanks,

Andrew J Durstewitz

---

<div class="post-metadata">

**Author:** ![Joe\_Pruitt](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/joe_pruitt/32/8438_2.png) [@Joe\_Pruitt](https://community.f5.com/u/Joe_Pruitt)\
**Post date:** [February 14, 2011, 3:10pm UTC](https://community.f5.com/t/java-gtm-pool-member-commonipportdefinition/4006/2 "2011-02-14T15:10:54Z")

</div>

Hi Andrew, the function prototype for the GlobalLB.Pool.get\_member() method is different from the LocalLB.Pool.get\_member() method. The API reference is here:

[http://devcentral.f5.com/wiki/default.aspx/iControl/GlobalLB\_\_Pool\_\_get\_member.html](http://devcentral.f5.com/wiki/default.aspx/iControl/GlobalLB __Pool__ get_member.html)

It looks like this

```tcl
struct GlobalLB.Pool.PoolMemberDefinition {
  IPPortDefinition member;
  long order;
};

GlobalLB.Pool.PoolMemberDefinition [] [] GlobalLB.Pool.get_member(
  in String [] pool_names
);

```

The java code to call it would looks something like this:

```tcl
iControl.GlobalLBPoolPoolMemberDefinition [][] memberDefAofA = 
  m_interfaces.getGlobalLBPool().get_member(pool_list);

```

All of the API references are available online in the iControl wiki at:

> **[DevCentral - An F5 Technical Community](https://community.f5.com/)**
>
> DevCentral is an online technical community where engineers and practitioners collaborate, share knowledge, and solve problems related to F5 technologies and industry trends.

Hope that helps…

-Joe

---

<div class="post-metadata">

**Author:** ![adurstewitz\_188](https://avatars.discourse-cdn.com/v4/letter/a/ea5d25/32.png) [@adurstewitz\_188](https://community.f5.com/u/adurstewitz_188)\
**Post date:** [February 14, 2011, 8:16pm UTC](https://community.f5.com/t/java-gtm-pool-member-commonipportdefinition/4006/3 "2011-02-14T20:16:09Z")

</div>

Hi Joe -

I’m with you so far, the only part I don’t understand is how to get memberDefAofA into CommonIPPortDefinition so I can get the address information.

Thanks!

Andrew J Durstewitz

---

<div class="post-metadata">

**Author:** ![Joe\_Pruitt](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/joe_pruitt/32/8438_2.png) [@Joe\_Pruitt](https://community.f5.com/u/Joe_Pruitt)\
**Post date:** [February 15, 2011, 7:02pm UTC](https://community.f5.com/t/java-gtm-pool-member-commonipportdefinition/4006/4 "2011-02-15T19:02:02Z")

</div>

Here’s how you iterate over the returned memberDefAofA 2-D array.

```tcl
// Iterate over the first dimension (each pool pass in as input).
for(int i=0; i
Hope this helps...
-Joe

```
