private static URI buildServiceUri(ServiceHost host,Class service,String path){
  URI serviceUri;
  String error;
  if (path != null) {
    serviceUri=UriUtils.buildUri(host,path);
    error=String.format("Invalid path for starting service [%s]",path);
  }
 else {
    serviceUri=UriUtils.buildUri(host,service);
    error=String.format("No SELF_LINK field in class %s",service.getCanonicalName());
  }
  if (serviceUri == null) {
    throw new InvalidParameterException(error);
  }
  return serviceUri;
}

private static URI buildServiceUri ( ServiceHost host , Class service , String path ) { URI serviceUri ; String error ; if ( path != null ) { serviceUri = UriUtils . buildUri ( host , path ) ; error = String . format ( "Invalid path for starting service [%s]" , path ) ; } else { serviceUri = UriUtils . buildUri ( host , service ) ; error = String . format ( "No SELF_LINK field in class %s" , service . getCanonicalName ( ) ) ; } if ( serviceUri == null ) { throw new InvalidParameterException ( error ) ; } return serviceUri ; }
constructs a uri to start service under .
