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