We could introduce a map to handle this. On Fri, Nov 14, 2014 at 11:45 PM, Chamila De Alwis <chami...@wso2.com> wrote:
> Hi, > > Is there a direct way of doing $subject other than iterating through all > the services from topology.getServices()? > > Service memberService = null; > for (Service service: topology.getServices()){ > Cluster cluster = service.getCluster(clusterId); > if (cluster != null) { > if (cluster.getMember(memberId) != null){ > memberService = service; > break; > } > }} > > > > Regards, > Chamila de Alwis > Software Engineer | WSO2 | +94772207163 > Blog: code.chamiladealwis.com > > > -- Imesh Gunaratne Technical Lead, WSO2 Committer & PMC Member, Apache Stratos