public ModelServiceInstance getModelServiceInstanceByAddress ( String serviceName , String instanceAddress ) { ModelService service = getModelService ( serviceName ) ; if ( service != null && service . getServiceInstances ( ) != null ) { for ( ModelServiceInstance instance : service . getServiceInstances ( ) ) { if ( instance . getAddress ( ) . equals ( instanceAddress ) ) { return instance ; } } } return null ; }
Get the ModelServiceInstance by serviceName and instanceAddress .